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 :: magento debug white page 
Php :: wordpress disable posts 
Php :: how to add cutom menu option in wordpress 
Php :: blade capitalize first letter 
Php :: get parameter in php 
Php :: string to float laravel 
Php :: php header excel utf-8 
Php :: laravel composer 
Php :: magento 2 get collection 
Php :: persian error laravel 
Php :: Laravel Drop All Tables & Migrate 
Php :: sort multi array php 
Php :: strpos in python 
Php :: display nav menu in frontend using Wordpress 
Php :: laravel create migration view 
Php :: laravel send post request from controller 
Php :: php foreach associative array 
Php :: laravel login by id 
Php :: php convert number to month 
Php :: header location in php 
Php :: php check weekday of date 
Php :: validate executable path vscode 
Php :: How to check leap year in php? 
Php :: Displaying all table names in php from MySQL database 
Php :: laravel wherehas 
Php :: guzzlehttp php basic auth 
Php :: change php version using htaccess 
Php :: get first element of array php 
Php :: file_get_contents url fail 
Php :: laravel blade auth user 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =