Postie From Address and Gmail

Started by stanl, August 26, 2014, 06:27:59 AM

Previous topic - Next topic

stanl

Wrote a script that uses a gmail account to send text and files through smtp.google.com but want the From Address to be different. According to the WB help for Kinit()

(s) fromaddr: The email address of the sender. This must look like a valid email address (even if it isn't one), e.g., postie@nospam.com or Guy Noir<guy@noir.com>.

However, using either port 465 or 587 with google ("tls") - the userid overrides the fromaddr. I tried the script from my personal email smtp and the fromaddr worked correctly (i.e. the email  appeared to come from the fromaddr not the userid).

Is this just a Google thing, and is there a way around it with Postie.

td

The following link offers insight into how Google handles remote SMTP relay and alternate addresses:

https://support.google.com/mail/answer/22370?hl=en
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Quote from: td on August 26, 2014, 06:57:35 AM
The following link offers insight into how Google handles remote SMTP relay and alternate addresses:

https://support.google.com/mail/answer/22370?hl=en

That was the first thing I read. I don't think it applies since this will be a compiled exe and the gmail user and pw will be hard-coded. Users of the exe will have any number of from addresses. In that case, it appears Postie is not an option.

[EDIT] I found this on LifeHacker

nd we discovered the following huge drawback: Gmail automatically rewrites the "from" line of any e-mail you send via their SMTP gateway to your Gmail address, and it overrides any Reply-To settings you may have in your e-mail software in favor of the one in Gmail's web interface. So while Gmail's SMTP access sure is handy, it's not a perfect solution for everybody.

td

Quote from: stanl on August 26, 2014, 07:23:07 AM
Quote from: td on August 26, 2014, 06:57:35 AM
The following link offers insight into how Google handles remote SMTP relay and alternate addresses:

https://support.google.com/mail/answer/22370?hl=en

That was the first thing I read. I don't think it applies since this will be a compiled exe and the gmail user and pw will be hard-coded. Users of the exe will have any number of from addresses. In that case, it appears Postie is not an option.

[EDIT] I found this on LifeHacker

nd we discovered the following huge drawback: Gmail automatically rewrites the "from" line of any e-mail you send via their SMTP gateway to your Gmail address, and it overrides any Reply-To settings you may have in your e-mail software in favor of the one in Gmail's web interface. So while Gmail's SMTP access sure is handy, it's not a perfect solution for everybody.

The link was offered as an explanation and not a solution so the posted link does 'apply' because it explains why you get the Postie result. (Note the comment, "link offers insight into how Google handles remote SMTP relay and alternate addresses") The  'LifeHacker' comment simple restates that explanation.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

....IFICantBYTE

Stan,
reading a few links about your issue, it definitely looks like Google re-defines the from and reply-to fields.
However, on one site where a person had the need to do this like you, someone suggested they use http://mandrill.com/ instead of Google to create a mail account that could be used programmatically like you want.
The site looks pretty good, and it seems to be free for up to 12,000 emails a month.
I've never used it or heard of it before (have heard of its parent company Mail Chimp though)... just thought it looked promising and worth sharing the info.

Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

stanl