When viewing in Gmail browser - I get message: ".$this->fo->printStatus( basename(_FILE_). $this->fo->printStatus('Email successfully sent to: '. $mail->AltBody = 'This email is formatted in HTML' $mail->isHTML(true) // Set email format to HTML $mail->AddStringAttachment($attachment, $filename, $encoding, $contentType) 13-03-2019: Add the attachment to the email If ( !empty($this->emailCC) ) $mail->addCC($this->emailCC) // Add a CC $mail->AddAddress(trim($address)) // Add a recipient(s) $mail->setFrom($this->fromEmail, $this->fromEmailName) // Add a FROM $mail->Port = SMTP_PORT // TCP port to connect to $mail->SMTPSecure = SMTP_AUTH // Enable TLS encryption, `ssl` also accepted $mail->Password = SMTP_PASS // SMTP password $mail->Username = SMTP_USER // SMTP username $mail->SMTPAuth = true // Enable SMTP authentication $mail->Host = SMTP_HOST // Specify main and backup SMTP servers $mail->isSMTP() // Set mailer to use SMTP $mail->SMTPDebug = 0 // Enable verbose debug output $mail = new PHPMailer\PHPMailer\PHPMailer(true) // Passing `true` enables exceptions $recipient = $delivery_email // = $this->emailHeader. $filename = $this->createFileName() //Get FileDate and Name I am sending attachments (CSV) which I have been sending for years using mail() but decided to migrate to SMTP for better reliability.Ĭode 1 (CSV attachment) $attachment = $this->CSVData // "Date","Name","Dept".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |