Search the Community
Showing results for tags 'mailer'.
-
$email = $_POST['email'];require_once "/var/www/html/swift_mailer/swift_required.php";// Create the Transport$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',***,'ssl')->setUsername('*******@****.com')->setPassword('***');// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport);// Create a message$message = Swift_Message::newInstance('Test Swift Mail Setup')->setFrom(array('******@***.com' => 'Statreferral Admin'))->setTo($email)->setBody($content,'text/html');// Send the message$result = $mailer->send($message); What is the wrong in this code pplease suggest me...... how can i check whether username contain mail server or not.....
-
In MVC i am including thease lines in config.php file $email = $_POST['email'];require_once "/var/www/html/swift_mailer/swift_required.php";// Create the Transport$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',465,'ssl')->setUsername(FROM)->setPassword(PASSWORDS);// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport); ----- files.php (controller) in controller functions i wrote like this $message = Swift_Message::newInstance('Test Swift Mail Setup')->setFrom(FROM)->setTo($email)->setBody($content,'text/html');// Send the message$result = $mailer->send($message); what is the error............