An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.
$mailheader = 'Thank you for your interest in xyz. \n\n"; $mailfooter = "Please do not reply to this message as it is sent from an automated system. If you wish to contact us for any reason, please visit our web site at etc etc"."\r\n"; $mailcombined = $mailheader.$mailfooter; $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = $mailhost; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = $mailusername; // SMTP username $mail->Password = $mailpassword; // SMTP password $mail->From = $mailfrom; $mail->FromName = $mailfromname; $mail->AddAddress("email@example.com"); $mail->WordWrap = 50; // set word wrap $mail->IsHTML(true); // send as HTML $mail->Subject = $mailsubject; // $mail->Body = "body"; $mail->Body = $mailcombined; $mail->AltBody = $mailcombined; $mail->Send();
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.