Search
 
SCRIPT & CODE EXAMPLE
 

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();
Comment

phpmailer for wordpress

function phpmailer_example( $phpmailer ) {
    $phpmailer->isSMTP();     
    $phpmailer->Host = 'smtp.example.com';
    $phpmailer->SMTPAuth = true; // Ask it to use authenticate using the Username and Password properties
    $phpmailer->Port = 25;
    $phpmailer->Username = 'yourusername';
    $phpmailer->Password = 'yourpassword';

    // Additional settings…
    $phpmailer->SMTPSecure = 'tls'; // Choose 'ssl' for SMTPS on port 465, or 'tls' for SMTP+STARTTLS on port 25 or 587
    $phpmailer->From = "you@yourdomail.com";
    $phpmailer->FromName = "Your Name";
}
add_action( 'phpmailer_init', 'phpmailer_example' );
Comment

PREVIOUS NEXT
Code Example
Php :: laravel 404 not found not showing error 
Php :: composer create project laravel 7 
Php :: previous url laravel 
Php :: ubuntu 18.04 php is not working 
Php :: how to get last array element in php 
Php :: php remove everything after character 
Php :: how to remove token while logout using laravel 8 
Php :: eloquent cast date 
Php :: create laravel project using laravel installer 
Php :: array push object php 
Php :: laravel print request data 
Php :: laravel assign active based on route name 
Php :: create new laravel project with specific version 
Php :: foreach loop in blade code 
Php :: delete cache laravel 
Php :: db symfony 
Php :: substr() php 
Php :: set character set utf8 in pdo php 
Php :: php refresh page 
Php :: str_includes php 
Php :: phpspreadsheet setcellvalue row background color 
Php :: counting a string in php 
Php :: echo alert php 
Php :: php artisan make controller model and migration 
Php :: laravel http request plain text 
Php :: wordpress get current category slug 
Php :: twig print_r 
Php :: how to take last entry in database in laravel Method Three 
Php :: check image exist or not in laravel 
Php :: deprecated filter_var() phpmailer 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =