Send e-mail from admin area to adresses in custom field

First, decide whether you want to use GET or POST for your form. (without specifying the method, it will use GET.) You will need the name attribute filled out for your textarea, so the info can actually be sent. Then add your form processing into your function: (i.e. if ( isset($_POST[“message”]) && !empty($_POST[“message”]) ) {…} … Read more

Add custom shortcodes to the Welcome Mail

Based on your updated question and comments, this should be what you are looking for: function wpse_225078_wpbd_tags( $tags ) { $tags[‘one_time_link’] = one_time_link(); return $tags; } add_filter( ‘wpbe_tags’, ‘wpse_225078_wpbd_tags’ ); The idea is to hook into the tag system provided by WPBE so you can just use %one_time_link% in your email template. Please note that … Read more

Wp_mail doesnt work

f you’re using anything that allows you to configure SMTP within WordPress, take it out. Then put everything into a function: add_action(‘init’,’delay_until_init’); function delay_until_init(){ // call wp_mail() here }

Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge

So turns out that on Safari and Firefox, the page would refresh before the email got sent out. As a workaround I just created another button that the user has to click on before clicking on the actual button that updates their profile information. The click event handler on that first button is being used … Read more

How to send email with wp_mail() with from email taken from contact form instead of the host?

You don’t need to pass the from name and email to PHPMailer in your code as it will take it from $headers so try the following: add_action( “phpmailer_init”, “send_smtp_email” ); function send_smtp_email( $phpmailer ) { // ini_set(“sendmail_from”,”[email protected]”); // ini_set(“sendmail_path”,”[email protected]”); // Define that we are sending with SMTP $phpmailer->isSMTP(); // The hostname of the mail server … Read more