Hi,
Been using code below to send emails for years, all worked well.
However my service provider recently moved my server over to what seems like a DoDaddy service & ever since sending emails has slowed down.
NOT the actual receiving at the other end, that's not too bad, but from the second I press SEND, I get a delay of 5 to 10 seconds before I get e.g. the message "Done"
It does the same from thunderbird & even the webmail server so not an access VBA thing but I was hoping perhaps as least try to see if I can get it to continue running in the background so I can go on the onto the next, might not seem like much of a wait but when going through lots does get very annoying, especially in all my years never had to put up with that. Have spoken to my ISP but seems nothing on the server side they can do.
Really don't want to use outlook & suspect would be the same.
Tried thowing in a few DoEvents but guess actually not what I want, or the opposite really.
Been using code below to send emails for years, all worked well.
However my service provider recently moved my server over to what seems like a DoDaddy service & ever since sending emails has slowed down.
NOT the actual receiving at the other end, that's not too bad, but from the second I press SEND, I get a delay of 5 to 10 seconds before I get e.g. the message "Done"
It does the same from thunderbird & even the webmail server so not an access VBA thing but I was hoping perhaps as least try to see if I can get it to continue running in the background so I can go on the onto the next, might not seem like much of a wait but when going through lots does get very annoying, especially in all my years never had to put up with that. Have spoken to my ISP but seems nothing on the server side they can do.
Really don't want to use outlook & suspect would be the same.
Tried thowing in a few DoEvents but guess actually not what I want, or the opposite really.
Code:
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = DLookup("[EmailUser]", "Utility Header", "[ID] = 1")
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = DLookup("[EmailPassword]", "Utility Header", "[ID] = 1")
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = DLookup("[MailServerOutgoing]", "Utility Header", "[ID] = 1")
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = ReadGV("EmailTimeOut", lngNumber)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 ' NOT 25 OR 587
'Use SSL for the connection (False or True)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Update
End With
With iMsg
Set .Configuration = iConf
.BodyPart.Charset = Me!EmailEncoding
.To = Me!Email
.BCC = EmailBCC
.From = DLookup("[BookingsEmailAddress]", "Utility Header", "[ID] = 1")
.Subject = Me!Subject
.htmlBody = Me!eResponseLetter
' ==============================
.Send ' ========= SEND EMAIL =========
' ==============================
End With
MSGBOX "Done"
Last edited: