swiftmailer

How to send mail using SMTP in PHP

How to send mail using SMTP in PHP

You have two primary choices that you can use: SwiftMailer library or the PHP Extension and Application Repository (PEAR). To use SwiftMailer, here is an example (although their documentation describes in more detail the individual methods, etc.) $transport = Swift_SmtpTransport::newInstance(‘mail.example.com’, 587); // your mail server address and port. If you don’t know what yours is, …