email sending...

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 88
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: 1622
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: 1622
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: 88
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

byronGaf
Posts: 3
Joined: 30 Apr 2019 20:59

email sending

Unread post by byronGaf » 4 May 2019 23:23

Hello. Im developing an application which sends information from a form that the user fills to an email address.
However, I dont want to write my email address or password in the code and send it to myself because my application can be decompiled and anyone can see my information then.

Any suggestions to send some information online without revealing any private information/login credentials?
Thank you.

User avatar
Tonton Luc
VIP Member
Posts: 500
Joined: 16 Oct 2001 23:01

Re: email sending...

Unread post by Tonton Luc » 26 Jun 2019 12:26

Hi,

:idea: You can also create an application which sends the information using xmlHttp60 + POST to a web server (PHP page as example), and from the web server your PHP application forwards the information to you by email => in this case, the user doesn't see your email adress and password.

Post Reply