too long

I've a setup with sendmail and PHP, sendmail is sending email through en Gmail/Google Apps account with SSL and SPF enabled.

Emails are delivered and working without any problems.

The only limitation so far is all outgoing emails are sent from the Gmail account set within sendmail.ini, the FROM: value gets ignored.

Is there anyway to let a script use a custom FROM when specified and use Gmail for the un-specified ones?

Hope this may help..

// Please specify your Mail Server - Example: mail.example.com.
ini_set("SMTP","mail.example.com");

// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set("smtp_port","25");

// Please specify the return address to use
ini_set('sendmail_from', 'example@YourDomain.com');

or for more info..

go in this link here.

I have Googled a lot for this but it seems like it's not a problem actually. The thing is I have to add whatever email I want to use as Sender (send from account) to the main Gmail account configured within sendmail.ini after that I was able to send from the allowed addresses.

However the problems accrues when we have a public form on the site and some one sends us an email, their address won't be shown as sender email either. the solution for this is to use the Reply-To header tag. Gmail still has limitations regarding this as the Reply-To address won't show correctly within Gmail. Tested both Web & Mobile/Android versions.

But it works fine within other email clients like MS Outlook and Thunderbird.