Results 1 to 2 of 2
  1. #1
    josekreif is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Posts
    27

    SMTP with CDO, works on one computer, but not the other


    This works on the computer I developed it on (Windows 10 Pro 64-bit, Office 2013 Pro)
    It Also works on a computer I have deployed it on (Windows 7 Pro 64bit, Office 2010 Pro)
    It doesnt work on the second computer I have deployed it on. (Windows 7 Pro 64-bit, Office 2010 Pro)

    My Location is IA, the first location is in NC the other is in TX... But States cant make a difference.


    Code:
     Set cdomsg = CreateObject("CDO.message")    With cdomsg.Configuration.Fields
          .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'NTLM method
          .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
          .Item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 25
          .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
          .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
          .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 5
          .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "me@gmail.com"
          .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = key
          .Update
        End With
      ' build email parts
        With cdomsg
          .To = "me@host"
          .From = "me@gmail.com"
          .Subject = "Title"
          .AddAttachment (dirname & fullName)
          .TextBody = "Body"
          .Send
        End With
        Set cdomsg = Nothing

    Click image for larger version. 

Name:	error.PNG 
Views:	5 
Size:	5.1 KB 
ID:	22824

    Port 25 isnt block, and they use Outlook for emails, so why there is a issue I dont know

  2. #2
    josekreif is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Posts
    27
    Until this is resolved.

    I have a work around.

    I send the file to our webserver with FTP and then use a script with contab to email the report out

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

Similar Threads

  1. Replies: 4
    Last Post: 04-30-2015, 04:55 AM
  2. Replies: 4
    Last Post: 11-29-2012, 12:45 AM
  3. Replies: 1
    Last Post: 05-25-2012, 10:36 AM
  4. smtp email code
    By alyon in forum Access
    Replies: 2
    Last Post: 05-15-2012, 07:42 AM
  5. Email from Access 2003 with SMTP authentication
    By prstoessel in forum Programming
    Replies: 1
    Last Post: 12-16-2011, 12:07 AM

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