mail() has a 4th and 5th parameter (optional). The 5th argument is what should be passed as options directly to sendmail. I use the following:
mail('[email protected]','subject!','body!','From: [email protected]','-f [email protected]');
More Related Contents:
- Query database then email posts from where user is subbed to
- how can i send an attachment with php using (mail) [duplicate]
- How to validate an email address in PHP
- Send email with PHP from html form on submit with the same script
- Send HTML in email via PHP
- Sending email with gmail smtp with codeigniter email library
- How to change from-address when using gmail smtp server
- How to send UTF-8 email?
- php mail() function on localhost
- Is there a PHP library for email address validation? [closed]
- How to get the content-type of a file in PHP?
- Sending mass email using PHP
- SMTP connect() failed PHPmailer – PHP
- Prevent sent emails treated as junk mails using php mail function
- When using Gmail for SMTP, can you set a different “from” address?
- How to get email address from a long string
- Trying to get Laravel 5 email to work
- How to use special characters in recipients name when using PHP’s mail function
- Proper prevention of mail injection in PHP
- Laravel mail: pass string instead of view
- PHP mail() attachment problems
- How to send mail using PHP?
- Change the sender name php mail instead of [email protected]
- Setting up PHPMailer with Office365 SMTP
- how to send an HTML email with an inline attached image with PHP
- Why is my e-mail still being picked up as spam? Using mail() function
- phpMailer – How do you Remove Recipients
- php mail function: legitimate mails marked as spam by gmail and hotmail
- Given an email as raw text, how can I send it using PHP?
- Simple PHP form: Attachment to email (code golf)