Results 1 to 5 of 5
  1. #1
    bobsg is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2019
    Posts
    3

    Automated sending of emails

    I have programs that run on a scheduler and email reports each morning. We currently using are testing moving to an Azure server in the cloud. The following code runs in our current environment but when running it on the Azure server in give the error shown below. I am beginning the trouble shooting process to get these programs running on Azure.

    Code:



    Dim cdoConfig
    Dim msgOne
    Dim strAttachment As String

    Set cdoConfig = CreateObject("CDO.Configuration")
    With cdoConfig.Fields
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServerPort) = 25
    .Item(cdoSMTPServer) = "Testing-com.mail.protection.outlook.com"
    .Update
    End With


    Set msgOne = CreateObject("CDO.Message")
    With msgOne
    Set .Configuration = cdoConfig
    .To = "bob@rsghi.com"
    .From = "bobrsghi@outlook.com"
    .Subject = "Test Email"
    .TextBody = "This is a test email."
    .Send
    End With

    Error:

    Run-time error ‘-2147220973 (80040213)’:
    The transport failed to connect to the server

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    This error is shown if any of the following are incorrect: server address, port, Use SSL setting.
    I don't use Azure so am unable to tell you what the values should be.

    However I suggest you test your settings on my CDO Email Tester app which includes a help file of all errors and their causes
    http://www.mendipdatasystems.co.uk/e...ter/4594365455
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    bobsg is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2019
    Posts
    3

    Thanks

    Quote Originally Posted by isladogs View Post
    This error is shown if any of the following are incorrect: server address, port, Use SSL setting.
    I don't use Azure so am unable to tell you what the values should be.

    However I suggest you test your settings on my CDO Email Tester app which includes a help file of all errors and their causes
    http://www.mendipdatasystems.co.uk/e...ter/4594365455
    Thanks. Downloaded utility. Will do testing.
    Bob

  4. #4
    bobsg is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2019
    Posts
    3
    Thank you. Downloaded utility. Will test.

    Bob

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Post 3 was moderated, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Automated Emails via Reports
    By spyldbrat in forum Access
    Replies: 4
    Last Post: 05-15-2019, 02:29 PM
  2. sending emails using VBA
    By StuartR in forum Access
    Replies: 4
    Last Post: 02-19-2018, 04:56 AM
  3. Replies: 1
    Last Post: 02-08-2017, 07:18 AM
  4. Sending Emails and VBA coding
    By lucy1216 in forum Programming
    Replies: 4
    Last Post: 05-20-2013, 05:57 AM
  5. Sending multiple emails
    By Petefured in forum Programming
    Replies: 0
    Last Post: 05-24-2011, 03:40 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