Hi
I use CDO to send emails via my Gmail address and it works just sweet When I try the same with an email address someone@outlook.com, it fails every time with a message The transport failed to connect to the server (error 1429)
With Gmail, the port number is 465. From my research, Outlook.com uses 587 or 25 I think Outlook requires TSL but I don't see that option with CDO I've tried the smtpserver as smtp-mail.outlook.com as well as smtp-mail.live.com
This same process (below) works well with an internal Exchange server.
(Winkiss is a table) TRY Local lcSchema, loConfig, loMsg, loError, lcErr lcErr = "" lcSchema = "http://schemas.microsoft.com/cdo/configuration/" loConfig = Createobject("CDO.Configuration")
With loConfig.Fields .Item(lcSchema + "smtpserver") = ALLTRIM(winkiss.opt15) .Item(lcSchema + "smtpserverport") = winkiss.portnum .Item(lcSchema + "sendusing") = 2 .Item(lcSchema + "smtpauthenticate") = .t. .Item(lcSchema + "smtpusessl") = winkiss.usessl .Item(lcSchema + "sendusername") = ALLTRIM(winkiss.usersig) .Item(lcSchema + "sendpassword") = ALLTRIM(winkiss.empw) .Update Endwith loMsg = Createobject ("CDO.Message")
With loMsg .Configuration = loConfig .From = ALLTRIM(winkiss.opt17) .To = ALLTRIM(winkiss.opt17) .Subject = "Test subject" .TextBody = "Testing SMTP emailing, from myself to myself" .Send() Endwith
etc
Does anyone have suggestions
Is winkiss.usessl = .T.? (This usually works when you can't use TSL.) Also, have you tried a timeout setting, say 30 or 60?
Laurie
On 2 April 2016 at 00:05, Sytze de Boer sytze.kiss@gmail.com wrote:
Hi
I use CDO to send emails via my Gmail address and it works just sweet When I try the same with an email address someone@outlook.com, it fails every time with a message The transport failed to connect to the server (error 1429)
With Gmail, the port number is 465. From my research, Outlook.com uses 587 or 25 I think Outlook requires TSL but I don't see that option with CDO I've tried the smtpserver as smtp-mail.outlook.com as well as smtp-mail.live.com
This same process (below) works well with an internal Exchange server.
(Winkiss is a table) TRY Local lcSchema, loConfig, loMsg, loError, lcErr lcErr = "" lcSchema = "http://schemas.microsoft.com/cdo/configuration/" loConfig = Createobject("CDO.Configuration")
With loConfig.Fields .Item(lcSchema + "smtpserver") = ALLTRIM(winkiss.opt15) .Item(lcSchema + "smtpserverport") = winkiss.portnum .Item(lcSchema + "sendusing") = 2 .Item(lcSchema + "smtpauthenticate") = .t. .Item(lcSchema + "smtpusessl") = winkiss.usessl .Item(lcSchema + "sendusername") = ALLTRIM(winkiss.usersig) .Item(lcSchema + "sendpassword") = ALLTRIM(winkiss.empw) .Update Endwith loMsg = Createobject ("CDO.Message")
With loMsg .Configuration = loConfig .From = ALLTRIM(winkiss.opt17) .To = ALLTRIM(winkiss.opt17) .Subject = "Test subject" .TextBody = "Testing SMTP emailing, from myself to myself" .Send() Endwith
etc
Does anyone have suggestions
-- Kind regards, Sytze de Boer
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Laurie, thanks for your queries. Yes to both.
On Sat, Apr 2, 2016 at 9:05 PM, Laurie Alvey trukker41@gmail.com wrote:
Is winkiss.usessl = .T.? (This usually works when you can't use TSL.) Also, have you tried a timeout setting, say 30 or 60?
Laurie
On 2 April 2016 at 00:05, Sytze de Boer sytze.kiss@gmail.com wrote:
Hi
I use CDO to send emails via my Gmail address and it works just sweet When I try the same with an email address someone@outlook.com, it fails every time with a message The transport failed to connect to the server (error 1429)
With Gmail, the port number is 465. From my research, Outlook.com uses
587
or 25 I think Outlook requires TSL but I don't see that option with CDO I've tried the smtpserver as smtp-mail.outlook.com as well as smtp-mail.live.com
This same process (below) works well with an internal Exchange server.
(Winkiss is a table) TRY Local lcSchema, loConfig, loMsg, loError, lcErr lcErr = "" lcSchema = "http://schemas.microsoft.com/cdo/configuration/" loConfig = Createobject("CDO.Configuration")
With loConfig.Fields .Item(lcSchema + "smtpserver") = ALLTRIM(winkiss.opt15) .Item(lcSchema + "smtpserverport") = winkiss.portnum .Item(lcSchema + "sendusing") = 2 .Item(lcSchema + "smtpauthenticate") = .t. .Item(lcSchema + "smtpusessl") = winkiss.usessl .Item(lcSchema + "sendusername") = ALLTRIM(winkiss.usersig) .Item(lcSchema + "sendpassword") = ALLTRIM(winkiss.empw) .Update Endwith loMsg = Createobject ("CDO.Message")
With loMsg .Configuration = loConfig .From = ALLTRIM(winkiss.opt17) .To = ALLTRIM(winkiss.opt17) .Subject = "Test subject" .TextBody = "Testing SMTP emailing, from myself to myself" .Send() Endwith
etc
Does anyone have suggestions
-- Kind regards, Sytze de Boer
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
I had similar problems with Outlook 365. The server is smtp.office365.com and somewhere in the documentation it says the port is 587. Didn't work - changed the port to 25 and everything was fine.
Laurie
On 2 April 2016 at 22:24, Sytze de Boer sytze.kiss@gmail.com wrote:
Laurie, thanks for your queries. Yes to both.
On Sat, Apr 2, 2016 at 9:05 PM, Laurie Alvey trukker41@gmail.com wrote:
Is winkiss.usessl = .T.? (This usually works when you can't use TSL.)
Also,
have you tried a timeout setting, say 30 or 60?
Laurie
On 2 April 2016 at 00:05, Sytze de Boer sytze.kiss@gmail.com wrote:
Hi
I use CDO to send emails via my Gmail address and it works just sweet When I try the same with an email address someone@outlook.com, it
fails
every time with a message The transport failed to connect to the server (error 1429)
With Gmail, the port number is 465. From my research, Outlook.com uses
587
or 25 I think Outlook requires TSL but I don't see that option with CDO I've tried the smtpserver as smtp-mail.outlook.com as well as smtp-mail.live.com
This same process (below) works well with an internal Exchange server.
(Winkiss is a table) TRY Local lcSchema, loConfig, loMsg, loError, lcErr lcErr = "" lcSchema = "http://schemas.microsoft.com/cdo/configuration/" loConfig = Createobject("CDO.Configuration")
With loConfig.Fields .Item(lcSchema + "smtpserver") = ALLTRIM(winkiss.opt15) .Item(lcSchema + "smtpserverport") = winkiss.portnum .Item(lcSchema + "sendusing") = 2 .Item(lcSchema + "smtpauthenticate") = .t. .Item(lcSchema + "smtpusessl") = winkiss.usessl .Item(lcSchema + "sendusername") = ALLTRIM(winkiss.usersig) .Item(lcSchema + "sendpassword") = ALLTRIM(winkiss.empw) .Update Endwith loMsg = Createobject ("CDO.Message")
With loMsg .Configuration = loConfig .From = ALLTRIM(winkiss.opt17) .To = ALLTRIM(winkiss.opt17) .Subject = "Test subject" .TextBody = "Testing SMTP emailing, from myself to myself" .Send() Endwith
etc
Does anyone have suggestions
-- Kind regards, Sytze de Boer
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
You have to be careful with hosted Exchange (i.e. Office 365) as it is picky about the 'from' address exactly matching valid credentials. The following works for me:
Port = 587 Use SSL = true Authentication = a valid username and password for an account that can send ("billy@yourdomain.com", "billypassword") IMPORTANT GOTCHA: The 'From' address must exactly match the authentication address ("billy@yourdomain.com") otherwise you will get "5.7.1 Client does not have permissions to send as this sender"
Also be aware that there are recipient and send rate limits with Office 365 hosted Exchange, so a maximum number of recipients you can send to per hour, and a maximum number of messages, and a maximum rate of submission. This is to stop people using it for bulk mailing. If you need to do that, you should really by using a dedicated service like MailJet (which can send on behalf of your domain).
Those rates only apply to submitting via SMTP. If you submit messages through Outlook via some automation method, or to Office 365 using one of the web APIs, internal queuing and throttling will be performed so that you don't hit those limits.