Title: Trouble with mail function
Last modified: August 19, 2016

---

# Trouble with mail function

 *  [bhavlice](https://wordpress.org/support/users/bhavlice/)
 * (@bhavlice)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/trouble-with-mail-function/)
 * I have 2 problems:
    1). On my development site when I attempt to send an email
   I get the following error: Warning: mail() [function.mail]: Failed to connect
   to mailserver at “localhost:2372” port 25, verify your “SMTP” and “smtp_port”
   setting in php.ini or use ini_set() in C:\wamp\www\wordpress\wp-content\plugins\
   BVD Plugin\index.php on line 814.
 * I have changed the SMTP server to one that I know works but the system ignores
   it and still uses the localhost. Does it not access the index.php file?
 * 2).
    I use another site on hotjava.org and I do not get the error. However I 
   do not recieve a simple email. The code is: $to = $row[‘UserEmail’]; $subject
   = “User Name and Password”; $message = “Your WordPress BVD User Name is: “. $
   un . “\nYour WordPress BVD User Password is: ” . $up . “\n”; $message = wordwrap(
   $message, 70); $from = “bill@futureaccess.com”; mail($to,$subject,$message,$headers);
 * Any ideas?
    Thanks in advance. Bill [bill@futureaccess.com](https://wordpress.org/support/topic/trouble-with-mail-function/bill@futureaccess.com?output_format=md)

The topic ‘Trouble with mail function’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [bhavlice](https://wordpress.org/support/users/bhavlice/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/trouble-with-mail-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
