Cheers,
I have used the express library, also xBase ++, to send emails, but I don't understand why they are not sent. On the screen, it shows something that has to do with authentication. I really don't understand. Please help me. Attachment, source program, and a jpg file with the result of the execution
FUNCTION EMAILNEW()
LOCAL oLog := LogWriter():new()
// Connect to the Windows Live SMTP server. Port number
// 587 implies a secure SSL connection. Use standard
// port 25 for unencrypted communication and for
// servers which do not support SSL.
//
//
//LOCAL oSmtp := SMTPClient():new( "smtp.live.com", 587,, oLog, 2)
LOCAL oSmtp := SMTPClient():new( "smtp-mail.outlook.com", 587,, oLog, 2)
LOCAL oSender := MailAddress():new( "megapro@hotmail.es" )
LOCAL oRecipient := MailAddress():new( "megapro@hotmail.es" )
LOCAL oMail := MIMEMessage():new()
LOCAL cText
cText := "Happy Birthday to Jane" + CRLF + CRLF
cText += "Cheers" + CRLF
cText += " Roseus" + CRLF
oMail:setFrom ( oSender )
oMail:setSubject ( "Greetings" )
oMail:setMessage ( cText )
oMail:addRecipient( oRecipient )
IF oSmtp:connect( "zeusgroupinc@hotmail.com", "EXTWIN360")
IF oSmtp:send( oMail )
? "Message sent"
ELSE
? "Unable to deliver message"
ENDIF
oSmtp:disconnect()
//
ELSE
? "Unable to connect to mail server"
ENDIF
RETURN .T.
Send email
-
- Posts: 176
- Joined: Thu Nov 05, 2020 10:51 am
- Location: DOMINICAN REPUBLIC
Send email
- Attachments
-
- ENVIO1.JPG (92.45 KiB) Viewed 10380 times
Re: Send email
Have you tried port 465?
Try this:
LOCAL oSmtp := SMTPClient():new( "tls://smtp-mail.outlook.com", 465,, oLog, 2)
Try this:
LOCAL oSmtp := SMTPClient():new( "tls://smtp-mail.outlook.com", 465,, oLog, 2)
The eXpress train is coming - and it has more cars.
-
- Posts: 176
- Joined: Thu Nov 05, 2020 10:51 am
- Location: DOMINICAN REPUBLIC
Re: Send email
HI
WITH THE SERVER NAME THAT DONNAY SENT ME, THE RESULT IS AS FOLLOWS:
THERE WAS NO CONNECTION WITH THE SERVER
WITH THE OTHER SERVERS I'VE TRIED, I THINK I'M CLOSE TO SUCCESSFUL ALTHOUGH THE FOLLOWING MESSAGE PERSISTS:
Info: Socket created successfully
Info: Successfully connected to smtp.gmail.com
Info: Server response: 220 smtp.gmail.com ESMTP y6sm2167045qkj.60 - gsmtp
Info: Sending: HELO nowhere.com
Info: Server response: 250 smtp.gmail.com at your service
Info: Sending: MAIL FROM: <megapro@hotamil.es>
Info: Server response: 530 5.7.0 Must issue a STARTTLS command first. y6sm2167045qkj.60 - gsmtp
Error: Unexpected response from server 5
Message transmission failed
Info: Sending: QUIT
**
DO YOU HAVE ANY IDEA OF THAT ERROR STOPPING THE SENDING OF THE EMAIL?
THANK YOU FOR THE HELP
WITH THE SERVER NAME THAT DONNAY SENT ME, THE RESULT IS AS FOLLOWS:
THERE WAS NO CONNECTION WITH THE SERVER
WITH THE OTHER SERVERS I'VE TRIED, I THINK I'M CLOSE TO SUCCESSFUL ALTHOUGH THE FOLLOWING MESSAGE PERSISTS:
Info: Socket created successfully
Info: Successfully connected to smtp.gmail.com
Info: Server response: 220 smtp.gmail.com ESMTP y6sm2167045qkj.60 - gsmtp
Info: Sending: HELO nowhere.com
Info: Server response: 250 smtp.gmail.com at your service
Info: Sending: MAIL FROM: <megapro@hotamil.es>
Info: Server response: 530 5.7.0 Must issue a STARTTLS command first. y6sm2167045qkj.60 - gsmtp
Error: Unexpected response from server 5
Message transmission failed
Info: Sending: QUIT
**
DO YOU HAVE ANY IDEA OF THAT ERROR STOPPING THE SENDING OF THE EMAIL?
THANK YOU FOR THE HELP
Re: Send email
hi,
as Roger sayDiego Euri Almanzar wrote: ↑Mon Dec 07, 2020 12:24 am Info: Server response: 530 5.7.0 Must issue a STARTTLS command first. y6sm2167045qkj.60 - gsmtp
some Provider use 465 instead of 587 even when "help" file say 587.Have you tried port 465?
greetings by OHR
Jimmy
Jimmy
-
- Posts: 176
- Joined: Thu Nov 05, 2020 10:51 am
- Location: DOMINICAN REPUBLIC
Re: Send email
Roger, and Jimmy, thank you for your attention and help.
I was able to solve the problem of sending emails by buying the latest version of Alaska Xbase ++ 2.0
Apparently version 1.9 has problems sending email. I am very satisfied with version 2.0
Best regards
I was able to solve the problem of sending emails by buying the latest version of Alaska Xbase ++ 2.0
Apparently version 1.9 has problems sending email. I am very satisfied with version 2.0
Best regards