Results 1 to 4 of 4
  1. #1
    Randy is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2010
    Posts
    48

    Code works on desktop not on Godaddy VPS

    I have a public sub (below) that works perfectly on my development desktop running MS Access (Office 365 Business Standard Click 2 Run) but won't send the email from the Godaddy VPS windows server 2016. I am using 2013 access runtime to run the database on the VPS. Everything works fine in runtime except the email send. I have searched for an answer for days with no luck.



    Public Sub DriverAlert_Click()
    Dim thund As String
    Dim stAddress As String
    Dim cc As String
    Dim bcc As String
    Dim subj As String
    Dim body As String


    stAddress = Me.AssignedDriverEmail
    'email = "test@test.com"
    'cc = "test@test.com"
    'bcc = "test@test.com"
    subj = "Driver Alert"
    body = "From" & vbCrLf & FrmCompanyFLC & vbCrLf & Me.FrmAddressFLC & vbCrLf & Me.FrmCityStateZipFLC & vbCrLf & Me.FrmContactFLC & vbCrLf & Me.FrmPhoneFLC & vbCrLf & vbCrLf & vbCrLf _
    & "TO" & vbCrLf & Me.ToCompanyFLC & vbCrLf & Me.ToAddressFLC & vbCrLf & Me.ToCityStateZipFLC & vbCrLf & Me.ToContactFLC & vbCrLf & Me.ToPhoneFLC & vbCrLf & vbCrLf _
    & "BILLING" & vbCrLf & Me.BillCompany & vbCrLf & Me.BillAddress & vbCrLf & Me.BillCityStateZip & vbCrLf & Me.BillPhone & vbCrLf & Me.BillContact & vbCrLf & Me.BillPO & vbCrLf & vbCrLf _
    & "Quantity: " & Me.NoOfPeicesFLC & vbCrLf & "Weight: " & Me.WeightFLC & vbCrLf & "Description: " & Me.Description & vbCrLf & "Miles: " & Me.Miles & vbCrLf & "Rate: " & Me.Rate & vbCrLf & "Arrive/Depart: " & Me.ArriveDepart & vbCrLf & "Flight #: " & Me.FlightNumberFLC & vbCrLf & "MAWB #: " & Me.MAWBFLC & vbCrLf & vbCrLf & "Notes: " & Me.NotesFLC & vbCrLf _


    thund = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe " & _
    "-compose " & """" & _
    "to='" & stAddress & "'," & _
    "cc='" & cc & "'," & _
    "bcc='" & bcc & "'," & _
    "subject='" & subj & "'," & _
    "body='" & body & "'" & """"
    ' DoCmd.SendObject , , acFormatTXT, stAddress, , , subj, body, True


    Call Shell(thund, vbNormalFocus)
    ' SendKeys "^+{ENTER}", True


    Exit Sub


    End Sub

    Thank you in advance.

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    And we assume you checked that you have Thunderbird installed in the same path...Can you open it and send a message manually?
    Maybe time to switch to using CDO to send your emails, many examples around here (Colin aka Isladogs has a demo on his site).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Randy is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2010
    Posts
    48
    Thank you Gicu. That was it. The paths were different on the two machines and I swear I have checked that several times. Thank you so much.

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250


    Glad to hear you've sorted it out!

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Code works only when manually stepping through it
    By john134 in forum Programming
    Replies: 16
    Last Post: 08-15-2016, 04:41 AM
  2. Replies: 2
    Last Post: 12-19-2014, 02:18 PM
  3. similar code, one works, the other doesn't
    By johnseito in forum Access
    Replies: 15
    Last Post: 11-03-2013, 07:59 PM
  4. Replies: 9
    Last Post: 06-26-2012, 04:11 PM
  5. Code works in full, fails in Runtime
    By stephenaa5 in forum Programming
    Replies: 3
    Last Post: 09-14-2010, 12:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums