Jump to content

swift mailer not calling from config file


sandeepm

Recommended Posts

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............

 

Link to comment
Share on other sites

 

what is the error............

 

good question. I'm not really sure what you're asking tbh. Are you getting an error? What is happening?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...