Dear All,
I Have an Requirement where i need to pass the mail server name dynamically for php mail, I know it is possible but don't know exactly how it works.
Iam working with php on Linux, Here is a simple Code Iam using for mail
*****************************
$to = "kattasrinivas@etisbew.com";
$subject = "Test";
$message ='Test';
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: kattasrinivas@etisbew.com\r\n";
if(mail($to, $subject, $message,$headers)) {
echo "Mail Sent";
} else {
echo "Mail Not Sent" ;
}
***************************************
In the above Program I need to pass the mail server name dynamically, By default the mail server is considered as localhost
Any help in thsi regard is highly appreciated
SMTP Mail in PHP/Linux
Moderator: General Moderators
-
kattasrinivas
- Forum Newbie
- Posts: 1
- Joined: Mon Apr 07, 2003 7:56 am
- Location: INDIA
- Contact:
http://www.php.net/manual/en/ref.mail.php
on non-win32-systems php uses the injection part of your MTA and the configuration for that is PHP_INI_SYSTEM so your php-script cannot change it. You cannot setup the local MTA to send the mails to another server?
on non-win32-systems php uses the injection part of your MTA and the configuration for that is PHP_INI_SYSTEM so your php-script cannot change it. You cannot setup the local MTA to send the mails to another server?