Title: php mail() function
Last modified: August 19, 2016

---

# php mail() function

 *  [icash](https://wordpress.org/support/users/icash/)
 * (@icash)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/php-mail-function/)
 * My WordPress admin email stopped coming through a couple of weeks ago. My webhosting
   support has told me that I need to do the following:
 * > Please added following line to your php scripts that contain php mail() function:
   > ini_set(‘sendmail_from’, ‘user@domain.com’);
   > where ‘user@domain.com’ is mail address specified as From: address for your
   > php mail sending.
 * Help? Which files contain the php mail() function? Where would I add that line?
 * Any help is appreciated… I am not a php programmer!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 9 months ago](https://wordpress.org/support/topic/php-mail-function/#post-670718)
 * Try this plugin instead:
    [http://just-thinkin.net/downloads/no-sender.zip](http://just-thinkin.net/downloads/no-sender.zip)
 * If that doesn’t work and let you get emails again, then edit the plugin and change
   the ” to ‘user@domain.com’. This is the WordPress equivalent of what they told
   you to do.
 *  Thread Starter [icash](https://wordpress.org/support/users/icash/)
 * (@icash)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/php-mail-function/#post-670770)
 * This didn’t resolve the problem. Additionally, now when I try to post a test 
   comment, it hangs the script. The comment ends up in the moderation cue, but 
   as a commenter, the script hangs until a “CGI timeout error” is received.
 * Turning off email notification in the options stops the comment script from hanging.
 * Any ideas?
 *  [andrewvos](https://wordpress.org/support/users/andrewvos/)
 * (@andrewvos)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-mail-function/#post-670996)
 * Ok I just made a fix for this:
 * [http://www.andrewvos.com/?p=375](http://www.andrewvos.com/?p=375)
 *  [freeriderzlv](https://wordpress.org/support/users/freeriderzlv/)
 * (@freeriderzlv)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/php-mail-function/#post-671020)
 * hey!
 * i face a similar problem.
 * When a user registers, he receives email from www-data@……. not freeriderz@…. 
   as I want to. The “www-data” comes from apache configuration – it`s the user/
   group in apache2handler. I cannot change it easily in apache configuration, so
   I wonder if there is a way to overcome this feature in wordpress. I tried no-
   sender and new user email setup plugins – no change.
 * I use sSMTP to send it the mail to my providers mail server. I tried everything,
   but it allows me to change only the domain in the email adress, not the user.
 * any ideas?
 *  [freeriderzlv](https://wordpress.org/support/users/freeriderzlv/)
 * (@freeriderzlv)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/php-mail-function/#post-671021)
 * anybody?

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘php mail() function’ is closed to new replies.

## Tags

 * [php mail](https://wordpress.org/support/topic-tag/php-mail/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [freeriderzlv](https://wordpress.org/support/users/freeriderzlv/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/php-mail-function/#post-671021)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
