email sending...

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 82
Joined: 18 Jul 2006 17:18

email sending...

Unread post by daveplummermd » 10 Feb 2019 0:33

Guys
Can you advise on how to send email from within VIP8CE program?

I have included the "sendMail_smtp" class in my project.
I have placed the code:

Code: Select all

predicates     onHelpTestemail : window::menuItemListener. clauses     onHelpTestemail(_Source, _MenuTag) :-         MailServer = sendMail_smtp::new("smtp.googlemail.com"),         MailServer:smtpPort := 587,         MailServer:send(["anyone@hcmed.org"], [], "daveplummermd@gmail.com", "Wow", "This is great content!"),         !.
generates the error that contains
----------------------------------------
Continued exception in sendMail package
Server Response = 501-5.5.4 Empty HELO/EHLO argument not allowed, closing connection.
501 5.5.4 https://support.google.com/mail/?p=helo l53sm7787346qtc.33 - gsmtp
sendMailException (sendMail_smtp)
sendMail_smtp::readLine
pfc\web\sendMail_smtp\sendMail_smtp.pro(111,13)
Naturally, I suspect this is because I am opening a socket with smtp.googlemail.com without authentification, but I do not see where to authenticate.

I have examined the sendMail_smtp.pro, *.i, and *cl, as well as the Wiki, example programs, and forum, to no avail.

Can you advise?

Thanks in advance
Dave
Dave Plummer

User avatar
Thomas Linder Puls
VIP Member
Posts: 2388
Joined: 28 Feb 2000 0:01

Re: email sending...

Unread post by Thomas Linder Puls » 10 Feb 2019 13:16

I am answering purely from my memory, so...
The HELO command uses the sender as argument, so you will have to set that property.
However as I recall it google's mail service requires an encrypted connection. On an unencrypted connection the SMTP (simple mail transfer protocol) is relatively simple,and we have (ourselves) just implemented it directly on top of socket connections. Using encryption on the other hand makes the protocol rather unsimple, because you first have to start unencrypted and then switch to encryption. We have not and will not implement the necessary encryption ourselves.
Maybe the curl library that some people have used has support for it.
Regards Thomas Linder Puls
PDC

User avatar
Thomas Linder Puls
VIP Member
Posts: 2388
Joined: 28 Feb 2000 0:01

Re: email sending...

Unread post by Thomas Linder Puls » 10 Feb 2019 13:27

Oh yes. Furthermore there is the problem with authentication. There is a large number of auxiliary subprotocols available for this. The SMTP package in vip 8 implements none of these. We have recently implemented authentication with plain user name and password (this will be in vip 9), but I doubt that Google allows this kind of authentication.
Regards Thomas Linder Puls
PDC

daveplummermd
VIP Member
Posts: 82
Joined: 18 Jul 2006 17:18

Re: email sending...

Unread post by daveplummermd » 11 Feb 2019 1:58

vip 9?
cant wait.
dp
Dave Plummer

Post Reply