I'm working on an invite a friend feature and would like to send emails in which the from field is the email address of the user sending the invites.I saw that evernote's emails are sent like that, and gmail shows some text saying via evernote.com.I'm wondering what's the correct way to do something like that and not get hit by spam filters. We're currently using postmark as the service through which we send our emails.
How to send email on behalf of a user?
email
I would check Postmark's terms of service to see if you're allowed to do that. Our application uses a custom invite feature built on Zend Framework so we used Zend_Mail to build the emails including headers and then send through our SMTP server using the from field as our users email address which they registered with.Your best bet as far as spam filters and outlooks junk filters are to test various emails, especially if you are using multi type/part emails with text and HTML versions.