Jump to content
Sign in to follow this  
sandeepm

swift mailer not calling from config file

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

 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...