I use mail to send email with PHP. It works fine, but now I need to use a more secure mail server.
I need to connect to the mail server using the following configuration:
smtp: "mail.newserver.com" port: "25" timeout: 60 auth: yes user: name pass: word
How do I change my code below to work with the above configuration?
$to = $SendTo; $headers = "From: <info@---->" . "\r\n" . "X-Mailer: php"; $subject = "Website Contact : " . $uxGlobalLocation; $body = $Bodycopy; if (mail($to, $subject, $body, $headers)) { header ('Location: /index.php?option'); exit(); } else { echo("<p>Message delivery failed...</p>"); }
php
acctman
source share