I am not new to php but what I want to try is new to me. i am designing a website (elbonfx.com)that I want to include a kind of newsletter system into. Now I have a form where visitors can insert their details and it gets sent to my email address. I can also send email to each subscriber one by one. Now I have heard of phpmailer and I want to give it a shot, like I can use it to send newsletters to all my subscribers at once individually. I can design a form which will have the fields I need to send the emails to my subscribers, like my name, email address, return address, subject and message body, and it will also have its action as the php page where the phpmailer class is included, but that is as far as my knowledge about it goes. How do I configure the phpmailer class? How do I call it? Inshort, how do I use the phpmailer class with my form to send mails to multiple recipients? Any help will be appreciated. Thanks in advance.
Jump to Post
It is very easy to incorporate and use the PHPMailer class, with the PHP mailer class they will be giving examples as well, please check them properly.
Or here the code goes like this
<?php require_once('class.phpmailer.php'); $bodyOfMail = file_get_contents('mail_contents.html'); send_mail('saiprem', 'email@example.com', $bodyOfMail) function send_mail($name, $email, $bodyOfMail) …
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.