Manol Posted April 10, 2018 Posted April 10, 2018 Hello. I'm developing a cooking recipes website, people subscribe to it to get daily recipes. What would be the best way to send emails to them using fields and images from a template and most important that those email can be opened from a mobile device and most email clients and see it correctly. Thanks.
wbmnfktr Posted April 10, 2018 Posted April 10, 2018 First idea: Mailchimp RSS campaign More details: https://mailchimp.com/features/rss-to-email/
gebeer Posted April 10, 2018 Posted April 10, 2018 To send emails from the template you would use WireMail, accessible in the API through $mail To get values for your image and other fields, just use regular $page->image, $page->title etc. The hardest part will be the cross-client responsive Email template. This is not a trivial thing to do. Some resources:http://leemunroe.github.io/responsive-html-email-template/email.htmlhttp://tedgoas.github.io/Cerberus/ If you send emails from ProcessWire and want to send them in plain text and in HTML, you typically construct the HTML email first and then convert that to a plain text version with something like $emailMessageAdminHtml = "<h1>Some HTML</h1><p>with paragraph</p>"; $emailMessage = str_replace( "<br>", "\n", strip_tags($emailMessageAdminHtml, '<br>') ); // construct email $mail->to($recipient); $mail->from($sender); $mail->subject($subject); $mail->body($emailMessage); $mail->bodyHTML('<html><body>' . $emailMessageAdminHtml . '</body></html>'); // send $mail->send(); 4
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now