התקנת SMTP

PHOTO EMBED

Tue May 18 2021 20:19:49 GMT+0000 (UTC)

Saved by @Shesek

function Computec_send_mail_using_smtp( $phpmailer ) {

$phpmailer->isSMTP();

$phpmailer->IsHTML(true);

$phpmailer->Host = 'smtp.gmail.com';

$phpmailer->Port = 587;

$phpmailer->Username = 'email@gmail.com';

$phpmailer->Password = 'some password';

$phpmailer->SMTPAuth = true;

$phpmailer->SMTPSecure = 'tls';

$phpmailer->From = 'email@gmail.com';

$phpmailer->FromName = get_bloginfo( 'name' );

}

add_action( 'phpmailer_init', 'Computec_send_mail_using_smtp' );
content_copyCOPY

קרדיט: שמעון סביר יש לשנות את הפרמטרים הבאים בהתאם 1. $phpmailer->Host = 'smtp.gmail.com'; 2. $phpmailer->Username = 'email@gmail.com'; 3. $phpmailer->Password = 'some password'; 4. $phpmailer->From = 'email@gmail.com';