Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:wampwwwmaincreateaccount.php on line 8
- $to = "xxx@hotmail.com";
- $subject = "Hi!";
- $body = "Hi,nnHow are you?";
- if (mail($to, $subject, $body)) {
- echo("<p>Message successfully sent!</p>");
- } else {
- echo("<p>Message delivery failed...</p>");
- }
- smtp_server=mail.yourdomain.com
- smtp_port=26
- smtp_ssl=none
- ;default_domain=yourdomain.com
- auth_username=smtpuser@yourdomain.com
- auth_password=smtppassword
- ;pop3_server=
- ;pop3_username=
- ;pop3_password=
- ;force_sender=
- ;force_recipient=
- [mail function]
- ; For Win32 only.
- SMTP =
- ; For Win32 only.
- sendmail_from =
- ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
- sendmail_path = "C:wampbinsendmailsendmail.exe -t"
- ini_set('SMTP', 'smtp.yourisp.com');
- SMTP = localhost
- smtp_port = 25
- sendmail_from = your_user@gmail.com
- ini_set("SMTP", "localhost");
- ini_set("smtp_port", "25");
- ini_set("sendmail_from", "your_user@gmail.com");
Add Comment
Please, Sign In to add comment