I’ve a problem since using ‘sendmail’ with Xojo 2015r2.4.
When I try this :
dim Socket1 as SMTPSecureSocket
socket1=new SMTPSecureSocket
socket1.Secure=true
Dim mail as EmailMessage
Socket1.address ="smtp.gmail.com"
Socket1.port = 465
Socket1.username ="xxxxxxxxxx@gmail.com"
Socket1.password ="xxxxxxxxxxxxxxx"
mail = New EmailMessage
mail.subject="Hello"
mail.BodyPlainText="Test"
mail.headers.appendHeader "X-Mailer","Nexxus"
mail.AddRecipient "xxxxxxxxxxxxx@gmail.com"
Socket1.messages.append mail
Socket1.SendMail
mail is sent and received correctly with Xojo 2014r2 but nothing happens with Xojo 2015r2.4
I’ve a problem since using ‘sendmail’ with Xojo 2015r2.4.
When I try this :
dim Socket1 as SMTPSecureSocket
socket1=new SMTPSecureSocket
socket1.Secure=true
Dim mail as EmailMessage
Socket1.address ="smtp.gmail.com"
Socket1.port = 465
Socket1.username ="xxxxxxxxxx@gmail.com"
Socket1.password ="xxxxxxxxxxxxxxx"
mail = New EmailMessage
mail.subject="Hello"
mail.BodyPlainText="Test"
mail.headers.appendHeader "X-Mailer","Nexxus"
mail.AddRecipient "xxxxxxxxxxxxx@gmail.com"
Socket1.messages.append mail
Socket1.SendMail
mail is sent and received correctly with Xojo 2014r2 but nothing happens with Xojo 2015r2.4
Someone has an idea of the problem ?
Thanks.[/quote]
Could be the SMTPSecureSocket gets out of scope when the event or method ends.
You may add the Socket1 as SMTPSecureSocket property to the window or webpage, and in your first line, simply do
SendMail is NOT instantaneous regardless of what the code looks like
IF that code is in the action of a button the n when the event exits the socket is destroyed & the mail may not be sent at all
I’ve a problem since using ‘sendmail’ with Xojo 2015r2.4.
When I try this :
dim Socket1 as SMTPSecureSocket
socket1=new SMTPSecureSocket
socket1.Secure=true
Dim mail as EmailMessage
Socket1.address ="smtp.gmail.com"
Socket1.port = 465
Socket1.username ="xxxxxxxxxx@gmail.com"
Socket1.password ="xxxxxxxxxxxxxxx"
mail = New EmailMessage
mail.subject="Hello"
mail.BodyPlainText="Test"
mail.headers.appendHeader "X-Mailer","Nexxus"
mail.AddRecipient "xxxxxxxxxxxxx@gmail.com"
Socket1.messages.append mail
Socket1.SendMail
mail is sent and received correctly with Xojo 2014r2 but nothing happens with Xojo 2015r2.4
Someone has an idea of the problem ?
Thanks.[/quote]
Have you tried to change the SSLSocket.ConnectionType ?
Remember that SecureSocket might not be secure at all. Looks like SMTPSecureSocket is falling back to insecure if it doesn’t get a certificate, when it should abort with an error.
[quote=219295:@Markus Winter]Remember that SecureSocket might not be secure at all. Looks like SMTPSecureSocket is falling back to insecure if it doesn’t get a certificate, when it should abort with an error.