email wordpress users using BCC

First: Don’t use mail(). Use wp_mail() instead. wp_mail( // Send it to yourself get_option( ‘admin_email’ ), ‘Your subject’, ‘Your message’, // extra headers array ( ‘Bcc:’ . implode( “,”, $usersarray ), ‘From:’ . get_option( ‘admin_email’ ) ) );

How to Configure SMTP on wordpress Cant Send Email

You didn’t say what the problem is. You certainly should be able to send email using PHP mail or plugins from wordpress. Is it a security problem? Your password being rejected at authentication? Try using OAuth 2.0. https://wordpress.org/plugins/postman-smtp/ Is it a firewall problem? Are all the SMTP ports blocked? Try sending with an HTTPS API … Read more

Adding attachment file name to email link

You can get the original attachment filename via wp_get_attachment_url: echo basename( wp_get_attachment_url( $post->ID ) ); or in the form of the example you provided: <a href=”https://wordpress.stackexchange.com/questions/91547/mailto:[email protected]?Subject=Image: <?php the_title(); ?> – <?php echo basename( wp_get_attachment_url( $post->ID ) ); ?>”>Get in touch about this image</a>

Emailing only the users of a MultiSites Sub-Sites

I’m actually in the process of creating a plugin that does this, and it doesn’t seem as if there are any special considerations needed for multisite sub-blogs. When the function checks for users of the blog, it only grabs those from the current blog (in my testing). Here’s some of my code to give you … Read more

On form submission how to send 2 email to different users

OK, so all you need to do is to add code for second email in the same place: if ( isset( $_POST[‘submit’]) ) { $ch_name = $_POST[‘ch_f_name’]; $ch_phone_num = $_POST[‘ch_phone_num’]; $ch_email = $_POST[‘ch_email’]; $ch_company = $_POST[‘ch_company’]; $ch_job_title = $_POST[‘ch_job_title’]; $to = $ch_email; $subject = “Thank you for job Submission “; $content = “‘.$ch_name.'”; $headers=”MIME-Version: 1.0″ … Read more

WooCommerce lost password reset flow not working with SendGrid (redirect loop)

If you’re using SendGrid to process emails from WooCommerce and have click tracking enabled, links that use $_GET vars will break. Sendgrid uses a URL sanitizer that converts the &id= to &amp;id= and that creates an issue in WooCommerce… The password reset form redirect looks for two get vars, $_GET[‘key’] and $_GET[‘id’], and if they’re … Read more

Is there a plugin that allows a user of your site to get an email from you with an attachment?

you can use wp_mail( $to, $subject, $message, $headers, $attachments ); to send emails with attachments. So all you need is a simple form <form name=”email-att” id=”email-att” method=”POST” action=””> Enter your emial: <br /> <input type=”text” name=”email” id=”email”/><br /> <input type=”hidden” name=”action” value=”email-att”/><br /> <input type=”submit” name=”submit” value=”submit” id=”submit”/> </form> and to process it <?php if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)