SalMail via an SMTP server fails. I have a workaround.

Post found bugs and possible workarounds.
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 30
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand

SalMail via an SMTP server fails. I have a workaround.

Post by Steve Leighton » 07 Mar 2017, 23:17

If using SalMail() class to send eMail via an SMTP server beware:

SMTPConnect() ALWAYS returns 0.
SMTPConnect() does not actually connect even though it says it has. ( any bogus Server / User / Password , or CORRECT Server / User / Password ) fails to connect.

Therefore:

SmtpSendMail() always returns -1 . I assume because SMTPConnect() does not connect.

p.s. I have a work around now. I use a COM interface to CDO mail. So using EXACTLY the same credentials as I use for SalMail , works fine . I can send you a sample if you also have this problem.
Best wishes
Steve
Bankside Systems Ltd. ( New Zealand )
www.banksidesystems.co.uk

Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 30
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand

Re: SalMail via an SMTP server fails. I have a workaround.

Post by Steve Leighton » 09 Mar 2017, 22:16

Update from Gupta:

"SMTPConnect does absolutely nothing. The SMPTSendMail() actually opens the SMTP connection and sends mail immediately".

The documentation is appallingly wrong - so don't waste time trying to fix SMTPConnect() or checking return codes etc. 'It does absolutely nothing'.
p.s. and ignore the TD documentation about SMTPConnect() .
Best wishes
Steve
Bankside Systems Ltd. ( New Zealand )
www.banksidesystems.co.uk

marlos
Argentina
Posts: 3
Joined: 14 Nov 2017, 15:41
Location: Ushuaia Argentina

Re: SalMail via an SMTP server fails. I have a workaround.

Post by marlos » 14 Nov 2017, 15:48

Steve:

Now the question is: How do I pass the address of the SMTP server, the port, the user and the password, if the function does not do anything? I've been struggling with that bookstore for two days.
Thank you very much for your reply.

Best Reagrds

carlos

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 129
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: SalMail via an SMTP server fails. I have a workaround.

Post by Igor Ivanovic » 15 Nov 2017, 06:45

Carlos,

I don't know what exactly te SmtpConnect does, but if I recall right, the original SalMail implementation was Gupta's own made from scratch which they replaced.
So it could be that the SmtpConnect is there just for backward compatibility.
You should set the user, password, port, server address with the SetServer and SetUser functions.
Igor Ivanovic
Image

EwaldP
Austria
Posts: 60
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: SalMail via an SMTP server fails. I have a workaround.

Post by EwaldP » 15 Nov 2017, 08:37

Hi, Carlos

we implemented SalMail in our own functional class for sending error reports / program update reports to our support team. Maybe this gives you an idea how you can implement SalMail.
2017-11-15 09_30_14-OpenText Gupta Team Developer 6.3 - hl_mail.apl - [hl_mail.apl].png

2017-11-15 09_31_27-OpenText Gupta Team Developer 6.3 - hl_mail.apl - [hl_mail.apl].png
Regards
You do not have the required permissions to view the files attached to this post.
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

marlos
Argentina
Posts: 3
Joined: 14 Nov 2017, 15:41
Location: Ushuaia Argentina

Re: SalMail via an SMTP server fails. I have a workaround.

Post by marlos » 15 Nov 2017, 12:02

Ewald:

Thank you very much for your valuable input. I think I've done something similar. Let me study it and I'll tell you. I can attach a small example of my code, very basic by the way, so you can see how I have incorporated the process of connecting to the SMTP server and sending the mail.
Also, thank you very much for taking care of the subject.

regards
carlos

marlos
Argentina
Posts: 3
Joined: 14 Nov 2017, 15:41
Location: Ushuaia Argentina

Re: SalMail via an SMTP server fails. I have a workaround.

Post by marlos » 15 Nov 2017, 23:32

Thank you very much to all who read and collaborated.
I have been able to solve my little problem, product of the collaboration of another colleague.
I have my code at your disposal if you request it by private message.

Best Regards

carlos

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 471
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: SalMail via an SMTP server fails. I have a workaround.

Post by Dave Rabelink » 30 May 2018, 14:56

The documentation has been changed in TD7.1, now indicating the connect does nothing.

TD-23427 : SMTPConnect does not do anything
Note: if using SailMail to send, a connection is not established at this time. The connection will occur when mail is sent.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests