TD-23427: SalMail via an SMTP server fails. I have a workaround.
-
- Site Admin
- Posts: 430
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
TD-23427: SalMail via an SMTP server fails. I have a workaround.
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.
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.
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
-
- Site Admin
- Posts: 430
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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() .
"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() .
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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
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
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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.
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
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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.
Regards
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.
Regards
You do not have the required permissions to view the files attached to this post.
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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
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
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
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
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
-
- Founder/Site Admin
- Posts: 3447
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
The documentation has been changed in TD7.1, now indicating the connect does nothing.
TD-23427 : SMTPConnect does not do anything
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
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: TD-23427: SalMail via an SMTP server fails. I have a workaround.
marlos wrote : "I have my code at your disposal if you request it by private message."...
so,but no answer
... anyvay, anyone ... please share a code
so,but no answer
... anyvay, anyone ... please share a code
Who is online
Users browsing this forum: [Ccbot] and 0 guests