PureSMTP library : mail & attachments (AUTH supported)
Moderator: gnozal
-
- Enthusiast
- Posts: 746
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
thanks gnozal
if I was the pope
AND
if I was a believer
AND
you are/were a believer
I would beatificate you and dedicate am enforced 3 day holiday!
though Saint Gnozal doesnt really sound so nice
but hey, after all its the thought that counts
cheers
if I was the pope
AND
if I was a believer
AND
you are/were a believer
I would beatificate you and dedicate am enforced 3 day holiday!
though Saint Gnozal doesnt really sound so nice
but hey, after all its the thought that counts
cheers
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update (PB 4.xx versions only)
Changes :
- fixed : some allocated memory wasn't freed if PureSMTP_SendMessage() was aborted from callback.
Changes :
- fixed : some allocated memory wasn't freed if PureSMTP_SendMessage() was aborted from callback.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Enthusiast
- Posts: 746
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
Question
I am testing by sending large files to my mail server in sequence
I use just 1 file attachment
if I use "" as message body it gives me an error on the 4th or 5th email I send in sequence
(error -6, 354 Enter mail,end with <CRLF>.<CRLF>
if I put a body with #CRLF$ + "." + #CRLF$ fails immidiately (I assume this is the end, so I SHOULDNT send that sequence)
with any other body text, it fails at random with the same -6 error
any ideas?
I'm using PB 4.10
I am testing by sending large files to my mail server in sequence
I use just 1 file attachment
if I use "" as message body it gives me an error on the 4th or 5th email I send in sequence
(error -6, 354 Enter mail,end with <CRLF>.<CRLF>
if I put a body with #CRLF$ + "." + #CRLF$ fails immidiately (I assume this is the end, so I SHOULDNT send that sequence)
with any other body text, it fails at random with the same -6 error
any ideas?
I'm using PB 4.10
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
#PureSMTP_ServerTimeOut (-6) is server timeout error (maybe the server is too busy) ; try increase the timeout value with PureSMTP_SetTimeOut(TimeOut) ; TimeOut in seconds [default is 5]kinglestat wrote:with any other body text, it fails at random with the same -6 error any ideas?
I'm using PB 4.10
NB : <CRLF>.<CRLF> is 'end of message' signal.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Enthusiast
- Posts: 746
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
thanks
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I get this reply back from relayfax:
I think the problem may be the "RCPT To:<true", should this be there the "<true" bit looks strange???ERROR: SMTP ERROR
PLEASE DO NOT REPLY TO THIS MESSAGE!
The following message could not be routed by RelayFax.
This is a permanent error. This fax will not be routed and has been removed
from the outbound queue.
--- Partial Session Transcript ---
MAIL From:<test@test.com>
250 Ok
RCPT To:<true
This is a test message
501 Bad address syntax
QUIT
--- End Transcript ---
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Yes, the "RCPT To:<true" is strange, the end of the address is missing and the server is supposed to answer after "RCPT TO:", e.g. with '250' if ok. So there is a missing CRLF after "RCPT TO:", wich is confirmed by the "501" error.DoubleDutch wrote:I get this reply back from relayfax:
I think the problem may be the "RCPT To:<true", should this be there the "<true" bit looks strange???ERROR: SMTP ERROR
PLEASE DO NOT REPLY TO THIS MESSAGE!
The following message could not be routed by RelayFax.
This is a permanent error. This fax will not be routed and has been removed
from the outbound queue.
--- Partial Session Transcript ---
MAIL From:<test@test.com>
250 Ok
RCPT To:<true
This is a test message
501 Bad address syntax
QUIT
--- End Transcript ---
This message occured using PureSMTP ?
Iirc PureSMTP sends "RCPT TO: " + MailTo$, not "RCPT To:" !?
Could you post the code relative to PureSMTP_SendMail() ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Here it is...
emailto$ is a standard email address, but it has quotes in it, eg:
"01234 5678,Mr Jones" <myfaxserver@mydomain.com>
smtpuser$ is a stanard email/login, such as myname@mydomain.com
smtppassword$ is a simple password
bodytext$ is just standard text.
The subject is a created id number
Do you recommend anything to capture the packets, so I can email them you?
Code: Select all
If PureSMTP_SendMail(emailto$,"ERAdmin <"+SMTPuser$+">","ID"+Str(id),bodytext$,"",SMTPuser$,SMTPpassword$)=#PureSMTP_Ok
ok=#True
EndIf
"01234 5678,Mr Jones" <myfaxserver@mydomain.com>
smtpuser$ is a stanard email/login, such as myname@mydomain.com
smtppassword$ is a simple password
bodytext$ is just standard text.
The subject is a created id number
Do you recommend anything to capture the packets, so I can email them you?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I just did a hex search and the only place your lib contains To: rather than TO: is here:the "RCPT To:<true" is strange
This may be a clue as to whats happening?CC:.Cc: .BCC:.Bcc: .To:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
2DoubleDutch : I can't find an obvious reason ...
1. Does it happen with all mails or only with some, i.e. what are the values of emailto$ when it fails ?
2. Are you using PB4.20 beta 2 ?
1. Does it happen with all mails or only with some, i.e. what are the values of emailto$ when it fails ?
2. Are you using PB4.20 beta 2 ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
1. Does it happen with all mails or only with some, i.e. what are the values of emailto$ when it fails ?
It's a standard email address (but with some quotes at the front), like:
"012345 23456, Mr Jones" <myfaxserver@mydomain.com>
2. Are you using PB4.20 beta 2 ?
Yes. Do you think it could be this?
It's a standard email address (but with some quotes at the front), like:
"012345 23456, Mr Jones" <myfaxserver@mydomain.com>
2. Are you using PB4.20 beta 2 ?
Yes. Do you think it could be this?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Just tried it on V4.10 and the v4.10 version of the lib - same result.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Also tried the V4.10 version on XP, same problem.
I now know whats causing it though...
The beginning of the email body is:
If I remove this then it works fine. These initial bits are parsed by the fax server to setup some settings - I guess they are somehow messed up with the email header?
I now know whats causing it though...
The beginning of the email body is:
Code: Select all
body$="CONFIRMSEND: true"+#CR$
body$+"NOCOVERPAGE: true"+#CR$
body$+"FROMNAME: Computing Data Limited"+#CR$+#CR$
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I changed the #CR$ to #CRLF$ throughtout the body of the email and it appears to work ok now - I don't know is this is a problem with your lib or the fax server system?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
HI Gnozal,
thanks for the very good lib, but now i found out a little problem with no solution for me:
i try to send a mail to a majordomo-mailiglist.
it looks good, but majordomo does't accept the mail, so i get no response.
i checked out diffrences between my mailer (with lib) and an other one
mailprogram (Portmailer) from which majordome accepts mails without problems.
The only diffrence was:
SMTP-Lib:
Portmailer:
Could it be that das "<>" around the mailadresses ist the reason.
I've no trouble with this syntax before, but majordomo seems to have a spezial behavior.
Is it possible to correct the syntax?
Best wishes
thanks for the very good lib, but now i found out a little problem with no solution for me:
i try to send a mail to a majordomo-mailiglist.
it looks good, but majordomo does't accept the mail, so i get no response.
i checked out diffrences between my mailer (with lib) and an other one
mailprogram (Portmailer) from which majordome accepts mails without problems.
The only diffrence was:
SMTP-Lib:
Code: Select all
From: <mail@adress.de>
To: <majordomo@test.de>
Date: 22 Mar 2008 11:12:14 UT
From: <mail@adress.de>
Subject: mm
X-Mailer: PureSMTP
Code: Select all
From: mail@adress.de
To: majordomo@test.de
Date: Sat, 22 Mar 2008 11:11:05 +0100
X-Priority: 3
X-Library: Indy 8.0.22
Message-ID: <9A69.69F5445mail@adress.de>
X-Mailer: Portable Mailer
I've no trouble with this syntax before, but majordomo seems to have a spezial behavior.
Is it possible to correct the syntax?
Best wishes