Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress PHPMailer config

add_action( 'phpmailer_init', 'setup_phpmailer_init' );
function setup_phpmailer_init( $phpmailer ) {
    $phpmailer->Host = 'HOSTNAME'; // for example, smtp.mailtrap.io
    $phpmailer->Port = 587; // set the appropriate port: 465, 2525, etc.
    $phpmailer->Username = 'YOURUSERNAME'; // your SMTP username
    $phpmailer->Password = 'YOURPASSWORD'; // your SMTP password
    $phpmailer->SMTPAuth = true;
    $phpmailer->SMTPSecure = 'tls'; // preferable but optional
    $phpmailer->IsSMTP();
Source by mailtrap.io #
 
PREVIOUS NEXT
Tagged: #wordpress #PHPMailer #config
ADD COMMENT
Topic
Name
5+1 =