phpmailer

PHP to connect to Hotmail to send email?

送分小仙女□ 提交于 2019-12-11 03:43:02
问题 currently I am trying to use PHPmailer to send email out. Here are the codes below <?php require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); // ---------- adjust these lines --------------------------- ------------ $mail->Username = "(username@hotmail.com)"; // your hotmail user name $mail->Password = "password"; $mail->AddAddress"(username@hotmail.com)"; // recipients email $mail->FromName = "test"; // readable name $mail->Subject = "Subject title"; $mail->Body = "Here is the

Attaching a file to PHPMailer

喜你入骨 提交于 2019-12-11 03:28:12
问题 I am currently working on a project that has files stored in a DB as blobs. I need to attach the file to an e-mail and send it out via PHPMailer. I am familiar with $mail->addAttachment() , however, this function seems to take in a file path only, which I don't have. I was wondering if there is any way to manipulate the blob and feed to this function ? I appreciate any suggestions, thanks in advance! The following successfully creates a 'Save As' dialog of the file I need to attach: header(

Setting up phpmailer on iis7

浪尽此生 提交于 2019-12-11 03:05:56
问题 I recently moved from windows shared hosting to a VPS. I'm struggling to get phpmailer to work for a contact form on my website. The code for my site the sets up the email to send is: $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "smtp.gmail.com"; // specify main and backup server or localhost $mail->SMTPAuth = true; // turn on SMTP authentication $mail->SMTPSecure = "tls"; $mail->SMTPDebug = 1; // can vary the amount of debug info given on error $mail->Username = "mail@mydomain

Send php mail using emails.txt and custom message from message.txt

北城以北 提交于 2019-12-11 02:42:26
问题 I'm trying to send email using PHP I have emails.txt with a list of emails and names split by ';' and I also have content.txt with the email message, for example, "Hello Mr. $name" I want to send an email, for all users, using content.txt file and alter the $name using the emails.txt to replace the string $name I built some parts, but I'm stuck <?php $file = fopen("emails.txt", "r"); $filecontent = fopen("content.txt", "r"); while(!feof($file)){ $line = fgets($file); $to = $line; $subject =

PHPMailer SMTP Gmail authentification error

怎甘沉沦 提交于 2019-12-11 02:23:46
问题 I'm sending emails using PHPMailer 5.2.10 with the next code: function SendGmail($to,$subj,$body) { $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // "ssl" secure transfer enabled REQUIRED for GMail $mail->Host = "smtp.gmail.com"; $mail->Port = 465; // 465 or 587 $mail->IsHTML(true); $mail->Username =

PHP : send ical using php mailer

£可爱£侵袭症+ 提交于 2019-12-11 02:17:50
问题 I am trying to send the ical using the php mailer here id my function function sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration) { //Convert MYSQL datetime and construct iCal start, end and issue dates $meetingstamp = strtotime($meeting_date . " UTC"); $dtstart= gmdate("Ymd\THis\Z",$meetingstamp); $dtend= gmdate("Ymd\THis\Z",$meetingstamp+$meeting_duration); $todaystamp = gmdate("Ymd\THis\Z"); //Create unique identifier $cal_uid = date('Ymd').'T'.date(

PhpMailer - Cannot send newsletter to large amount of subscribers

喜你入骨 提交于 2019-12-11 01:59:27
问题 Im having a big problem here! I need to send a newsletter to all my subscribers (around 1200) The thing is that it only sends the newsletter to 150-180 of them. I have a script implemented in php that uses the PhpMailer() class to send the newsletter to all the subscribers. I purchased a plan in MailJet that allows me to send 30 thousand emails per month, so Im using their SMTP host to send the newsletter. Here is my script: $mail = new PHPMailer(); $body = $message; $body = eregi_replace("[\

PHPMailer - AddAttachment not working

谁都会走 提交于 2019-12-11 01:58:41
问题 I have a web form which emails the form content back to me using the phpmailer function. I'm trying to add an AddAttachment feature but I seems to have an issue in the php. This is my html snippet: <td> <div align="right">Add attachment :</div> </td> <td colspan="2"> <input type="file" name="uploaded_file" id="uploaded_file" /> <input type="hidden" name="MAX_FILE_SIZE" value="10000000" /> </td> And this is my php; <?php require 'PHPMailerAutoload.php'; $mail = new PHPMailer(); $mail->IsSMTP()

How to fix undefined method PHPMailer::AddAdress() error?

一世执手 提交于 2019-12-11 00:38:50
问题 I am making a PHP mail script, and I'm using phpmailer for it. I get the error: Fatal error: Call to undefined method PHPMailer::AddAdress() in This is my code: if (empty($errors)) { $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; $m->SMTPdebug = 2; $m->Host = 'smtp.gmail.com'; $m->Username = 'email@gmail.com'; $m->Password = '******' $m->SMTPSecure = 'tls'; $m->Port = 465; $m->isHTML(); $m->Subject = 'Contact form submitted'; $m->Body = 'From: ' . $fields['name'] . ' (' . $fields[

Sending attachments with PHPmailer - returns .dat file

老子叫甜甜 提交于 2019-12-10 23:56:04
问题 Hopefully someone out there can point out what I've missed! I have a script which I took from PHPMailer's Github example here which I placed in my page, and updated the HTML. Although the image uploads fine and the email comes through, the file attachment is a .dat file instead of the correct extension. Here's my PHP in case something I've changed isn't as it should be: if (array_key_exists('userfile', $_FILES)) { $uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['userfile']['name']));