Page 1 of 2

PB 5.40LTS CreateMail headers

Posted: Wed Oct 28, 2015 8:45 pm
by ShotGun Jack
Any way to create mail using header format in form of From: Joe <joe@mymail.com>? I tried using SetMailAttribute with the #PB_Mail_Custom option but that adds in an additional line in the message header instead of replacing it. That method results in recipients mail server rejecting the email.

Re: PB 5.40LTS CreateMail headers

Posted: Wed Oct 28, 2015 10:00 pm
by infratec
Hi,

have you tried:

Code: Select all

CreateMail(0, "test <test@purebasic.com>", "Hello")
Bernd

Re: PB 5.40LTS CreateMail headers

Posted: Thu Oct 29, 2015 4:22 am
by ShotGun Jack
infratec wrote:Hi,

have you tried:

Code: Select all

CreateMail(0, "test <test@purebasic.com>", "Hello")
Bernd
tried and failed

Re: PB 5.40LTS CreateMail headers

Posted: Thu Oct 29, 2015 8:48 am
by infratec
Hi,

I just tested it: it works.

I use Thunderbird as mail program and smtpd on debian as server.
If I use something like "Sender <test@purebasic.com>"
I see "Sender" as From.

Also in wireshark you can see the correct From: entry.

Bernd

Re: PB 5.40LTS CreateMail headers

Posted: Thu Oct 29, 2015 3:15 pm
by ShotGun Jack
Maybe my mailserver doesn't like it somehow cuz if I do it like this it never makes it to the receiver. Of course if I use plain standard format email address all works fine. I assumed there was some type of pb email address qualifier/tester on these headers but if you got it to work then I am missing something.

Re: PB 5.40LTS CreateMail headers

Posted: Thu Oct 29, 2015 3:17 pm
by infratec
Check it with wireshark.

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 12:49 am
by ShotGun Jack
ok , finally got back to messing with this. Loaded up wireshark-neat pgm btw- and it appears that pb encapsulates the address within < > so what the mailserver is reporting is MAIL FROM: <mytitle <myemail@domain.com>> and is rejected. I guess my question is does pb automatically do this and how to prevent it.

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 8:19 am
by infratec
Hi,

I can not confirm this.
Here it works as expected:

PB
Thunderbird
Wireshark

Image

Bernd

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 10:04 am
by c4s

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 10:33 am
by infratec
But as you can see in my example:
It works already.

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 2:10 pm
by ShotGun Jack
Maybe debian smtpd corrects it or accepts it. It appears some servers reject it.

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 2:24 pm
by ShotGun Jack
FWIW, this is partial exchange that Wireshark captures ...

Code: Select all

	SMTP	97	C: MAIL FROM:<WORXXXX <contact@worXXXX.com>>
	SMTP	128	S: 501 <WORXXXX <contact@worXXXX.com>>: "@" or "." expected after "WORXXXX"
	SMTP	60	C: QUIT

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 2:27 pm
by c4s
infratec wrote:But as you can see in my example:
It works already.
I'm not sure about that, because the feature request emerged from this German topic where Kiffi said that "name <address>" does not work (and it's not documented either).

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 3:00 pm
by infratec
ShotGun Jack wrote:FWIW, this is partial exchange that Wireshark captures ...

Code: Select all

	SMTP	97	C: MAIL FROM:<WORXXXX <contact@worXXXX.com>>
	SMTP	128	S: 501 <WORXXXX <contact@worXXXX.com>>: "@" or "." expected after "WORXXXX"
	SMTP	60	C: QUIT
Hmmm...

what have you captured?
That's not the packet from PB.

And which exact version of PB do you use (x86 or x64) and on which OS?
I use PB 5.40 x86 on win7 x64.

Bernd

Re: PB 5.40LTS CreateMail headers

Posted: Tue Nov 03, 2015 3:49 pm
by ShotGun Jack
PB 5.40LTS x64 on MS Windows 7 64bit

What I captured is what wireshark reports while negociating with the mail server on port 587 when I run the pb mailing program.

The mail server I use to send mail is reported as xxxxxxx.inmotionhosting.com ESMTP Exim 4.85