• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP imap_mail函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中imap_mail函数的典型用法代码示例。如果您正苦于以下问题:PHP imap_mail函数的具体用法?PHP imap_mail怎么用?PHP imap_mail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了imap_mail函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _sendSummaryEmail

 function _sendSummaryEmail()
 {
     if (count($this->_getMsgIDs()) < 1) {
         $this->_addToSummary('No ARB emails to process');
         return;
     }
     $summary = $this->_summaryToString();
     $envelope["from"] = ini_get('sendmail_from');
     $body[] = array("type" => TYPEMULTIPART, "subtype" => "mixed");
     $body[] = array('type' => 0, 'encoding' => 0, 'subtype' => "PLAIN", 'contents.data' => $summary);
     foreach ($this->_getAttachments() as $filename => $attachment) {
         $body[] = array('type' => 0, 'encoding' => 0, 'subtype' => "X-COMMA-SEPARATED-VALUES", 'description' => $filename, 'disposition.type' => 'attachment', 'disposition' => array('filename' => $filename), 'dparameters.filename' => $filename, 'parameters.name' => $filename, 'contents.data' => $attachment);
     }
     $msg = imap_mail_compose($envelope, $body);
     list($t_header, $t_body) = split("\r\n\r\n", $msg, 2);
     $t_header = str_replace("\r", '', $t_header);
     $success = imap_mail(_CRM_PROCESS_AUTHORIZE_REPORT_SUMMARY_TO_EMAIL, 'Authorize.net Report Processesing Summary', $t_body, $t_header);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:18,代码来源:ProcessAuthorizeReport.php


示例2: SendMail


//.........这里部分代码省略.........
                                     $attname = $part->headers['content-description'];
                                 } else {
                                     $attname = "unknown attachment";
                                 }
                             }
                         }
                         // ignore html content
                         if ($part->ctype_primary == "text" && $part->ctype_secondary == "html") {
                             continue;
                         }
                         //
                         if ($use_orgbody || $attached) {
                             $body .= $this->enc_attach_file($att_boundary, $attname, strlen($part->body), $part->body, $part->ctype_primary . "/" . $part->ctype_secondary);
                         } else {
                             $encmail = $body;
                             $attached = true;
                             $body = $this->enc_multipart($att_boundary, $body, $forward_h_ct, $forward_h_cte);
                             $body .= $this->enc_attach_file($att_boundary, $attname, strlen($part->body), $part->body, $part->ctype_primary . "/" . $part->ctype_secondary);
                         }
                     }
                 }
                 $body .= "--{$att_boundary}--\n\n";
             }
             unset($mobj2);
         }
         // unset origmail - free memory
         unset($origmail);
     }
     // remove carriage-returns from body
     $body = str_replace("\r\n", "\n", $body);
     //advanced debugging
     //debugLog("IMAP-SendMail: parsed message: ". print_r($message,1));
     debugLog("IMAP-SendMail: headers: {$headers}");
     debugLog("IMAP-SendMail: subject: {$message->headers["subject"]}");
     debugLog("IMAP-SendMail: body: {$body}");
     //
     if (!defined('IMAP_USE_IMAPMAIL') || IMAP_USE_IMAPMAIL == true) {
         $send = @imap_mail($toaddr, !isset($message->headers["subject"]) ? "" : $message->headers["subject"], $body, $headers, $ccaddr, $bccaddr);
     } else {
         if (!empty($ccaddr)) {
             $headers .= "\nCc: {$ccaddr}";
         }
         if (defined('INTERNAL_SMTPCLIENT_SERVERNAME') && INTERNAL_SMTPCLIENT_SERVERNAME != '') {
             $headers .= "\nSubject: " . (!isset($message->headers["subject"]) ? "" : $message->headers["subject"]);
             $headers .= "\nTo: " . (!isset($message->headers["to"]) ? "" : $message->headers["to"]);
             $send = @InternalSMTPClient($fromaddr, !isset($message->headers["to"]) ? "" : $message->headers["to"], !isset($message->headers["cc"]) ? "" : $message->headers["cc"], !isset($message->headers["bcc"]) ? "" : $message->headers["bcc"], $headers . "\n" . $body);
         } else {
             if (!empty($bccaddr)) {
                 $headers .= "\nBcc: {$bccaddr}";
             }
             $send = @mail($toaddr, !isset($message->headers["subject"]) ? "" : $message->headers["subject"], $body, $headers, $envelopefrom);
         }
     }
     // email sent?
     if (!$send) {
         debugLog("The email could not be sent. Last-IMAP-error: " . imap_last_error());
         return 120;
     }
     // add message to the sent folder
     // build complete headers
     $headers .= "\nTo: {$toaddr}";
     $headers .= "\nSubject: " . $message->headers["subject"];
     if (!defined('IMAP_USE_IMAPMAIL') || IMAP_USE_IMAPMAIL == true) {
         if (!empty($ccaddr)) {
             $headers .= "\nCc: {$ccaddr}";
         }
         if (!empty($bccaddr)) {
             $headers .= "\nBcc: {$bccaddr}";
         }
     }
     //debugLog("IMAP-SendMail: complete headers: $headers");
     $asf = false;
     if ($this->_sentID) {
         $asf = $this->addSentMessage($this->_sentID, $headers, $body);
     } else {
         if (defined('IMAP_SENTFOLDER') && IMAP_SENTFOLDER) {
             $asf = $this->addSentMessage(IMAP_SENTFOLDER, $headers, $body);
             debugLog("IMAP-SendMail: Outgoing mail saved in configured 'Sent' folder '" . IMAP_SENTFOLDER . "': " . ($asf ? "success" : "failed"));
         } else {
             debugLog("IMAP-SendMail: No Sent mailbox set");
             if ($this->addSentMessage("INBOX.Sent", $headers, $body)) {
                 debugLog("IMAP-SendMail: Outgoing mail saved in 'INBOX.Sent'");
                 $asf = true;
             } else {
                 if ($this->addSentMessage("Sent", $headers, $body)) {
                     debugLog("IMAP-SendMail: Outgoing mail saved in 'Sent'");
                     $asf = true;
                 } else {
                     if ($this->addSentMessage("Sent Items", $headers, $body)) {
                         debugLog("IMAP-SendMail: Outgoing mail saved in 'Sent Items'");
                         $asf = true;
                     }
                 }
             }
         }
     }
     // unset mimedecoder - free memory
     unset($mobj);
     return $send && $asf;
 }
开发者ID:BackupTheBerlios,项目名称:z-push-svn,代码行数:101,代码来源:imap.php


示例3: send

 public function send($to, $subject, $message, $headers = NULL, $settings = NULL)
 {
     return imap_mail($to, $subject, $message, $headers);
 }
开发者ID:znframework,项目名称:znframework,代码行数:4,代码来源:Imap.php


示例4: sendMail

 /**
  * @brief		Methode Simple d'envoi mail
  * @details		Methode simplissime 
  *
  * @param	to	Mail du destinataire
  * @param	subject	String Objet de mon mail
  * @param	message	String Message a envoyer
  *
  * @return	bool	True si succes false sinon 	
  *
  */
 public function sendMail($to, $subject, $message)
 {
     $status = imap_mail($to, $subject, $message);
     return $status;
 }
开发者ID:Akrobate,项目名称:akrocrm,代码行数:16,代码来源:myMail.class.php


示例5: sendMessage

 /**
  * !Broken
  *
  * @param array $reciever
  * @param $subject
  * @param $message
  * @return bool
  */
 private function sendMessage(array $reciever, $subject, $message)
 {
     $header = new MessageHeader($reciever['bcc'], $reciever['cc'], Carbon\Carbon::now()->toDateTimeString(), $this->email, $subject, $reciever['to']);
     $body = new MessageBody($message);
     $message = imap_mail_compose($header->toArray(), array($body->toArray()));
     return imap_mail($header->to, $header->subject, $message);
 }
开发者ID:hadvig,项目名称:laravel-imap,代码行数:15,代码来源:Client.php


示例6: send

 /**
  * @param string $subject
  * @param string $error
  */
 public function send($subject, $error)
 {
     imap_mail($subject, $error);
 }
开发者ID:jpauli,项目名称:PHP-Observer-SPL-Pattern,代码行数:8,代码来源:Imap.php


示例7: sendTicketReassignment

function sendTicketReassignment($toEmail, $subjectl)
{
    $subject = "Ticket Assigned";
    $body = "Collaborative Platform has assigned you a new ticket " . $subjectl . "that was previously assigned to another mentor.\n Thank you for Making Collaborative Platform Great";
    $headers = "From: [email protected]\r\n" . "Reply-To: [email protected]\r\n";
    $cc = null;
    $bcc = null;
    $return_path = "[email protected]";
    //send the email using IMAP
    $a = imap_mail($toEmail, $subject, $body, $headers, $cc, $bcc, $return_path);
    echo "Email sent!<br />";
}
开发者ID:acuba001,项目名称:Collaborative-Platform,代码行数:12,代码来源:EmailListener.php


示例8: SendMail

 function SendMail($rfc822, $forward = false, $reply = false, $parent = false)
 {
     debugLog("IMAP-SendMail: " . $rfc822 . "for: {$forward}   reply: {$reply}   parent: {$parent}");
     $mobj = new Mail_mimeDecode($rfc822);
     $message = $mobj->decode(array('decode_headers' => true, 'decode_bodies' => true, 'include_bodies' => true, 'input' => $rfc822, 'crlf' => "\n", 'charset' => 'utf-8'));
     $toaddr = $ccaddr = $bccaddr = "";
     if (isset($message->headers["to"])) {
         $toaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["to"]));
     }
     if (isset($message->headers["cc"])) {
         $ccaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["cc"]));
     }
     if (isset($message->headers["bcc"])) {
         $bccaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["bcc"]));
     }
     // save some headers when forwarding mails (content type & transfer-encoding)
     $headers = "";
     $forward_h_ct = "";
     $forward_h_cte = "";
     $use_orgbody = false;
     // clean up the transmitted headers
     // remove default headers because we are using imap_mail
     $changedfrom = false;
     foreach ($message->headers as $k => $v) {
         if ($k == "subject" || $k == "to" || $k == "cc" || $k == "bcc") {
             continue;
         }
         // save the original type & encoding headers for the body part
         if ($forward && $k == "content-type") {
             $forward_h_ct = $v;
             continue;
         }
         if ($forward && $k == "content-transfer-encoding") {
             $forward_h_cte = $v;
         }
         // if the message is a multipart message, then we should use the sent body
         if (!$forward && $k == "content-type" && preg_match("/multipart/i", $v)) {
             $use_orgbody = true;
         }
         // check if "from"-header is set
         if ($k == "from" && !empty($this->_config['IMAP_FORCEFROM'])) {
             $changedfrom = true;
             $v = $this->_config['IMAP_FORCEFROM'];
             $v = str_replace('%u', $this->_username, $v);
             $v = str_replace('%d', $this->_domain, $v);
         }
         // all other headers stay
         if ($headers) {
             $headers .= "\n";
         }
         $headers .= ucfirst($k) . ": " . $v;
     }
     if (!empty($this->_config['IMAP_FORCEFROM']) && !$changedfrom) {
         $v = $this->_config['IMAP_FORCEFROM'];
         $v = str_replace('%u', $this->_username, $v);
         $v = str_replace('%d', $this->_domain, $v);
         if ($headers) {
             $headers .= "\n";
         }
         $headers .= 'From: ' . $v;
     }
     // if this is a multipart message with a boundary, we must use the original body
     if ($use_orgbody) {
         list(, $body) = $mobj->_splitBodyHeader($rfc822);
     } else {
         $body = $this->getBody($message);
     }
     // reply
     if (isset($reply) && isset($parent) && $reply && $parent) {
         $this->imap_reopenFolder($parent);
         $origmail = @imap_body($this->_mbox, $reply, FT_PEEK | FT_UID);
         $mobj2 = new Mail_mimeDecode($origmail);
         // receive only body
         $body .= $this->getBody($mobj2->decode(array('decode_headers' => true, 'decode_bodies' => true, 'include_bodies' => true, 'input' => $origmail, 'crlf' => "\n", 'charset' => 'utf-8')));
     }
     // forward
     if (isset($forward) && isset($parent) && $forward && $parent) {
         $this->imap_reopenFolder($parent);
         // receive entire mail (header + body)
         $origmail = @imap_fetchheader($this->_mbox, $forward, FT_PREFETCHTEXT | FT_UID) . @imap_body($this->_mbox, $forward, FT_PEEK | FT_UID);
         // build a new mime message, forward entire old mail as file
         list($aheader, $body) = $this->mail_attach("forwarded_message.eml", strlen($origmail), $origmail, $body, $forward_h_ct, $forward_h_cte);
         // add boundary headers
         $headers .= "\n" . $aheader;
     }
     //advanced debugging
     //debugLog("IMAP-SendMail: headers: $headers");
     //debugLog("IMAP-SendMail: body: $body");
     $send = @imap_mail($toaddr, $message->headers["subject"], $body, $headers, $ccaddr, $bccaddr);
     // add message to the sent folder
     // build complete headers
     $cheaders = "To: " . $toaddr . "\n";
     $cheaders .= "Subject: " . $message->headers["subject"] . "\n";
     $cheaders .= "Cc: " . $ccaddr . "\n";
     $cheaders .= $headers;
     $asf = false;
     if ($this->_sentID) {
         $asf = $this->addSentMessage($this->_sentID, $cheaders, $body);
     } else {
         debugLog("IMAP-SendMail: No Sent mailbox set");
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:z-push-svn,代码行数:101,代码来源:imap.php


示例9: sendMessage

 public function sendMessage($to, $subject, $message)
 {
     return imap_mail($to, $subject, $message);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:4,代码来源:lib.php


示例10: imap_fetch_overview

            /* get information specific to this email */
            $Data[$IX] = (array) imap_fetch_overview($Call['Link'], $Number, 0)[0];
            $Data[$IX]['message'] = base64_decode(imap_fetchbody($Call['Link'], $Number, 2));
            $IX++;
        }
    } else {
        $Data = null;
    }
    return $Data;
});
setFn('Write', function ($Call) {
    $Headers['from'] = $Call['From'];
    $Headers['subject'] = $Call['ID'];
    $Headers['date'] = date(DATE_RFC2822);
    $HTML = [];
    $Plain = [];
    $HTML['type'] = TYPETEXT;
    $HTML['charset'] = 'utf-8';
    $HTML['subtype'] = 'html';
    $HTML['description'] = '';
    $HTML['contents.data'] = $Call['Data'];
    $Plain['type'] = TYPETEXT;
    $Plain['charset'] = 'utf-8';
    $Plain['subtype'] = 'plain';
    $Plain['description'] = '';
    $Plain['contents.data'] = strip_tags($Call['Data']);
    $Body = [['type' => TYPEMULTIPART, 'subtype' => 'alternative'], $HTML, $Plain];
    $Envelope = str_replace("\r", '', imap_mail_compose($Headers, $Body));
    imap_mail($Call['Scope'], $Call['ID'], $Envelope);
    return $Call['Data'];
});
开发者ID:trickyplan,项目名称:codeine,代码行数:31,代码来源:IMAP.php


示例11: sha1

$e = sha1($email);
$to = trim($email); 

$subject = "[Marktplatz.cc] Request to Reset Your Password";
 
        $headers = "From: Marktplatz.cc <[email protected]> Content-Type: text/plain";
 
        $msg = <<<EMAIL
We just heard you forgot your password! Bummer! To get going again,
head over to the link below and choose a new password.

Follow this link to reset your password:
http://www.vollrot.de/marktplatz/resetpassword.php?v=$ver&e=$e

If you have any questions, please contact [email protected].

--
Thanks!

EMAIL;
 
mail($to, $subject, "blabla", $headers); 

echo $headers." => ".$to;
*/
// Die Nachricht
$nachricht = "blablabla";
// Send
mail('[email protected]', 'Mein Betreff', $nachricht);
imap_mail('[email protected]', 'Mein Betreff', $nachricht);
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:30,代码来源:test.php


示例12: SendMail

 function SendMail($rfc822, $forward = false, $reply = false, $parent = false)
 {
     debugLog("IMAP-SendMail: " . $rfc822 . "for: {$forward}   reply: {$reply}   parent: {$parent}");
     $mobj = new Mail_mimeDecode($rfc822);
     $message = $mobj->decode(array('decode_headers' => true, 'decode_bodies' => true, 'include_bodies' => true, 'input' => $rfc822, 'crlf' => "\n", 'charset' => 'utf-8'));
     $toaddr = $ccaddr = $bccaddr = "";
     if (isset($message->headers["to"])) {
         $toaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["to"]));
     }
     if (isset($message->headers["cc"])) {
         $ccaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["cc"]));
     }
     if (isset($message->headers["bcc"])) {
         $bccaddr = $this->parseAddr(Mail_RFC822::parseAddressList($message->headers["bcc"]));
     }
     // save some headers when forwarding mails (content type & transfer-encoding)
     $headers = "";
     $forward_h_ct = "";
     $forward_h_cte = "";
     // clean up the transmitted headers
     // remove default headers because we are using imap_mail
     foreach ($message->headers as $k => $v) {
         if ($k == "subject" || $k == "to" || $k == "cc" || $k == "bcc") {
             continue;
         }
         // save the original type & encoding headers for the body part
         if ($forward && $k == "content-type") {
             $forward_h_ct = $v;
             continue;
         }
         if ($forward && $k == "content-transfer-encoding") {
             $forward_h_cte = $v;
         }
         // all other headers stay
         if ($headers) {
             $headers .= "\n";
         }
         $headers .= ucfirst($k) . ":" . $v;
     }
     $body = $this->getBody($message);
     // reply
     if (isset($reply) && isset($parent) && $reply && $parent) {
         $this->imap_reopenFolder($parent);
         $origmail = imap_body($this->_mbox, $reply, FT_PEEK | FT_UID);
         $mobj2 = new Mail_mimeDecode($origmail);
         // receive only body
         $body .= $this->getBody($mobj2->decode(array('decode_headers' => true, 'decode_bodies' => true, 'include_bodies' => true, 'input' => $origmail, 'crlf' => "\n", 'charset' => 'utf-8')));
     }
     // forward
     if (isset($forward) && isset($parent) && $forward && $parent) {
         $this->imap_reopenFolder($parent);
         // receive entire mail (header + body)
         $origmail = imap_fetchheader($this->_mbox, $forward, FT_PREFETCHTEXT | FT_UID) . imap_body($this->_mbox, $forward, FT_PEEK | FT_UID);
         // build a new mime message, forward entire old mail as file
         list($aheader, $body) = $this->mail_attach("forwarded_message.eml", strlen($origmail), $origmail, $body, $forward_h_ct, $forward_h_cte);
         // add boundary headers
         $headers .= "\n" . $aheader;
     }
     //advanced debugging
     //debugLog("IMAP-SendMail: headers: $headers");
     //debugLog("IMAP-SendMail: body: $body");
     $send = imap_mail($toaddr, $message->headers["subject"], $body, $headers, $ccaddr, $bccaddr);
     // add message to the sent folder
     // build complete headers
     $cheaders = "To: " . $toaddr . "\n";
     $cheaders .= "Subject: " . $message->headers["subject"] . "\n";
     $cheaders .= "Cc: " . $ccaddr . "\n";
     $cheaders .= $headers;
     $asf = false;
     if ($this->_sentID) {
         $asf = $this->addSentMessage($folderid, $cheaders, $body);
     } else {
         debugLog("IMAP-SendMail: No Sent mailbox set");
         if ($this->addSentMessage("INBOX.Sent", $cheaders, $body)) {
             debugLog("IMAP-SendMail: Outgoing mail saved in 'INBOX.Sent'");
             $asf = true;
         } else {
             if ($this->addSentMessage("Sent", $cheaders, $body)) {
                 debugLog("IMAP-SendMail: Outgoing mail saved in 'Sent'");
                 $asf = true;
             } else {
                 if ($this->addSentMessage("Sent Items", $cheaders, $body)) {
                     debugLog("IMAP-SendMail: Outgoing mail saved in 'Sent Items'");
                     $asf = true;
                 }
             }
         }
     }
     return $send && $asf;
 }
开发者ID:BackupTheBerlios,项目名称:z-push-svn,代码行数:90,代码来源:imap.php


示例13: mail

                        for ($i = 0; $i <= $HowMany; $i++) {
                            mail($_POST['To'], $_POST['Sub'], $_POST['Message'], $_POST['Heads']);
                        }
                    }
                } else {
                    if (imap_mail($_REQUEST['To'], $_REQUEST['Sub'], $_REQUEST['Message'], $_REQUEST['Heads'])) {
                        echo 'E-Mail was sent successfully!';
                    } else {
                        echo 'Error While Sending Mail.';
                        GetLastError();
                        echo '<br />';
                        $Suc = FALSE;
                    }
                    if ($Suc = TRUE && $HowMany > 1) {
                        for ($i = 0; $i <= $HowMany; $i++) {
                            imap_mail($_POST['To'], $_POST['Sub'], $_POST['Message'], $_POST['Heads']);
                        }
                    }
                }
            }
            echo '<form action="" method="post"><fieldset style="width:590px;"><legend>Send E-Mail</legend>
			<table><tr><td>Sender E-Mail:</td><td><input type="text" name="From" id="From" size="40" /></td></tr><tr><td>
			Recipient\'s E-Mail:</td><td><input type="text" name="To" id="To" size="40" value="[Separated by \',\']" /></td></tr><tr><td>
			Subject:</td><td><input type="text" name="Sub" id="Sub" size="40" /></td></tr></table><br />
			Message:<br /><textarea rows="7" cols="70" id="Message" name="Message"></textarea><br /><br />
			Additional Headers:<br /><textarea rows="7" cols="50" id="Heads" name="Heads" spellcheck="false">[Separated by Enter]' . "\r\n" . 'Example:', "\r\n", 'X-Mailer: PHP/4.3', "\r\n", 'Reply-To: [email protected]</textarea><br />
			<br />How many Times: <input type="text" size="1" id="HowMany" name="HowMany" /><br />
			<br /><input type="reset" value="Reset" /> <input type="submit" value="Send!" />
			</fieldset></form>';
        } else {
            echo 'Can\'t Send E-Mail From this Server.';
开发者ID:retanoj,项目名称:webshellSample,代码行数:31,代码来源:b4f5bdf68cc31d9a73cec13a20cde9f4.php


示例14: print_r

    $to = "[email protected]";
    $from = "From: " . $to;
    $subject = "A New Address from " . $name . " via wedding.joemorrow.org/contact";
    $body = "Here's a new address submission from http://wedding.joemorrow.org/address\n\nFrom: {$name} <{$email}>\n\nAddress:\n{$address}\n\nMessage:\n{$message}\n\nNumber of Kitties: {$human}\n(EOM)\n";
    // If we're debugging, output the variables
    if ($debug) {
        echo "<p><pre>";
        print_r($_POST);
        echo "\n\nFirst Name:\n{$firstName}\n";
        echo "\n\nAddress:\n{$address}\n";
        echo "\n\nMessage:\n{$body}\n";
        echo "</pre></p>";
    }
    // Our SPAM filter only checks for a text entry.
    if (is_numeric($human)) {
        if (imap_mail($to, $subject, $body, $from)) {
            // Don't show the form if the send was successful
            $showForm = false;
            ?>
			<section class="success">
				<p>Thanks for your updated address, <?php 
            echo $firstName;
            ?>
!  You'll be hearing from us soon.</p>
			</section>

			<footer>
				<p><a target="_self" href="javascript:history.go(-2)"><i class="fa fa-hand-o-left fa-fw"></i>Go Back</a></p>
				<p><a target="_self" href="../"><i class="fa fa-home fa-fw"></i>Back to Home</a></p>
			</footer>
开发者ID:joemorrow,项目名称:wedding.joemorrow.org,代码行数:30,代码来源:index.php


示例15: sendMessage

 public function sendMessage($toaddress, $ccaddress, $bccaddress, $subject, $message)
 {
     $body = $this->composeMessage($message);
     imap_mail($toaddress, $subject, $body, null, $ccaddress, $bccaddress, null);
     //use imap_append to add message sent to Sent Items
 }
开发者ID:maniargaurav,项目名称:OpenDesk,代码行数:6,代码来源:mail.php


示例16: sendMail


//.........这里部分代码省略.........
            //Username to use for SMTP authentication - use full email address for gmail
            $mail->Username = $EMAIL;
            $mail->SMTPSecure = 'tls';
            break;
        default:
            ///TEST HOST
            //	$MAIL_HOST = "mail.incanberra.biz";
            $mail->Host = gethostbyname($MAIL_HOST);
            //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
            //$MAIL_PORT = 587;
            $mail->Port = $MAIL_PORT;
            $USERNAME = substr($EMAIL, 0, strpos($EMAIL, "@"));
            if ($DEBUG) {
                logEntry("Username extracted from email: " . $USERNAME);
            }
            $mail->Username = $USERNAME . "@" . $MAIL_HOST;
            //$mail->Username = $EMAIL;
            //$mail->Username = "[email protected]";
            //$mail->SMTPSecure = 'tls';
            $mail->SMTPSecure = 'ssl';
            // use
            //logEntry("trying to pop3 auth");
            //$pop = POP3::popBeforeSmtp($MAIL_HOST, 110, 30, $USERNAME, $PASSWORD, 1);
            //print_r($pop);
            break;
    }
    //Ask for HTML-friendly debug output
    //Whether to use SMTP authentication
    $mail->SMTPAuth = true;
    //Password to use for SMTP authentication
    $mail->Password = $PASSWORD;
    //Set who the message is to be sent from
    $mail->setFrom($EMAIL, 'Holiday');
    //Set an alternative reply-to address
    $mail->addReplyTo($EMAIL, 'Holiday');
    //Set who the message is to be sent to
    $mail->addAddress($to, $from);
    //Set the subject line
    $mail->Subject = $subject;
    //Read an HTML message body from an external file, convert referenced images to embedded,
    //convert HTML into a basic plain-text alternative body
    $mail->msgHTML($body);
    //Replace the plain text body with one created manually
    $mail->AltBody = $body;
    //	$mail->SMTPAutoTLS;
    if ($DEBUG) {
        $mail->Debugoutput = 'html';
        logEntry("SMTP host: " . $mail->Host);
        logEntry("SMTP port: " . $mail->Port);
        logEntry("SMTP send username: " . $mail->Username);
        logEntry("SMTP send password: " . $mail->Password);
        //logEntry("SMTP send setFrom: ");
        logEntry("SMTP send smtpAuth: " . $mail->SMTPAuth);
        logEntry("SMTP send smtpSEcure: " . $mail->SMTPSecure);
        logEntry("SMTP send subject: " . $mail->Subject);
        //logEntry("SMTP ato tls: ".$mail->SMTPAutoTLS);
    }
    //Attach an image file
    //$mail->addAttachment('images/phpmailer_mini.png');
    //send the message, check for errors
    sleep(1);
    //	if (!$mail->send()) {
    //$mail->preSend();
    //if(!$mail->postSend()) {//->mail()) {
    //	logEntry( "Mailer Error: " . $mail->ErrorInfo);
    //} else {
    //		logEntry( "Message sent!");
    //	}
    //	$to = "[email protected]";
    //	$subject = "Test Email";
    //	$body = "This is only a test.";
    $headers = "From: " . $from . "\r\n" . "Reply-To: " . $from . "\r\n";
    $cc = null;
    $bcc = null;
    $return_path = $from;
    //send the email using IMAP
    $subject = "NOREPLY: Automatic response";
    logEntry("To: " . $to);
    logEntry("From: " . $from);
    logEntry("Subject: " . $subject);
    logEntry("Body: " . $body);
    //$a = imap_mail($to, $subject, $body, $headers, $cc, $bcc, $return_path);
    logEntry("imap response: " . $a);
    if ($DEBUG) {
        print_r($a);
    }
    $mboxSend = imap_open("{mail.incanberra.biz:993/ssl/novalidate-cert}INBOX", "bshaver", "Bshaver12345") or die('connection failed ' . imap_last_error());
    //$to='[email protected]';
    //	$siteemail='[email protected]';
    $siteemail = $EMAIL;
    $subject = "This is subject";
    $headers .= "From: {$siteemail}<{$siteemail}>\n";
    $headers .= "X-Sender: <{$siteemail}>\n";
    $headers .= "X-Mailer: PHP\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "Return-Path: <{$siteemail}>\n";
    $message = "This is the text.";
    imap_mail($to, $subject, $message, $headers) or die('send failed ' . imap_last_error());
    imap_close($mboxSend);
}
开发者ID:LightsOnHudson,项目名称:FPP-Plugin-StockTicker,代码行数:101,代码来源:commonFunctions.inc.php


示例17: guest

    $subject .= "RSVP from " . $name . " via wedding.joemorrow.org/rsvp";
    $body = "Here's a new message from http://wedding.joemorrow.org/rsvp\n\nFrom: {$name} <{$email}>\n";
    $body .= "Referer = \"" . $referer . "\"\n\n";
    $body .= $attend ? "Will attend\nThere will be {$count} guest(s) in total\n\nSong Recommendations:  {$song}\n\n" : "Will not attend\n\n";
    $body .= "Comments:\n{$comments}\n\n(EOM)\n";
    // If we're debugging, output the variables
    if ($debug) {
        echo "<p><pre>";
        print_r($_POST);
        echo "\n\nFirst Name:\n{$firstName}\n";
        echo "\n\nReference:\n{$ref}\n";
        echo "\n\nMessage:\n{$body}\n";
        echo "</pre></p>";
    }
    //	if (imap_mail($to, $subject, $body, $from)) {
    if (!function_exists("imap_mail") || imap_mail($to, $subject, $body, $from)) {
        // Don't show the form if the send was successful
        $showForm = false;
        if ($attend) {
            ?>
			<section class="success">
				<h2>Thanks for your reply, we are looking forward to celebrating with you!</h2>
				<p>If you haven't already done so, please make your <a href="../accommodations/">hotel and travel</a> plans soon; <strong>our hotel blocks will be released on August 27</strong>.</p>
				<p>Although it's not required, please <a target="_self" href="../contact/?ref=shuttle">let us know</a> if you're interested in taking our hotel shuttle to the ceremony, so we can size our reservations accordingly.</p>
				<p>Please <a href="../contact/">contact us</a> if you have any questions!</p>

			</section>

<?php 
        } else {
            ?>
开发者ID:joemorrow,项目名称:wedding.joemorrow.org,代码行数:31,代码来源:index.php


示例18: send

 /**
  * Sends the mail.
  */
 function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '')
 {
     $to = $to_name != '' ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr;
     $from = $from_name != '' ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr;
     if (is_string($headers)) {
         $headers = explode($this->lf, trim($headers));
     }
     for ($i = 0; $i < count($headers); $i++) {
         if (is_array($headers[$i])) {
             for ($j = 0; $j < count($headers[$i]); $j++) {
                 if ($headers[$i][$j] != '') {
                     $xtra_headers[] = $headers[$i][$j];
                 }
             }
         }
         if ($headers[$i] != '') {
             $xtra_headers[] = $headers[$i];
         }
     }
     if (!isset($xtra_headers)) {
         $xtra_headers = array();
     }
     if (EMAIL_TRANSPORT == 'smtp') {
         $additional_headers = 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers);
     } else {
         $additional_headers = 'From: ' . $from . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers);
     }
     return mail($to, $subject, $this->output, $additional_headers);
     $mbox = imap_open("{pop.masterhost.ru:110/pop3}INBOX", "[email protected]", "kdje834dW");
     $mailed = imap_mail($to, $subject, $this->output, $additional_headers);
     imap_close($mbox);
     return $mailed;
 }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:36,代码来源:email.php


示例19: imap_delete

     // delete
     imap_delete($mbox, $_SESSION['unread_list'][$_SESSION['curr_index']]);
     imap_expunge($mbox);
 } elseif ($_POST['defer']) {
     // do not mark as read, but skip it
 } elseif ($_POST['ignore']) {
     // ignore
     //mark as read THIS IS NOT working with POP3 Grrrr!
     $status = imap_setflag_full($mbox, $_SESSION['unread_list'][$_SESSION['curr_index']], "\\Seen");
 } elseif ($_POST['reply']) {
     // send the message
     $header = imap_header($mbox, $_SESSION['unread_list'][$_SESSION['curr_index']]);
     $to = $header->reply_toaddress;
     $subject = $header->subject;
     // send the message
     imap_mail($to, $subject, $_POST['message']);
     //echo imap_last_error();
     // mark it as read
     $status = imap_setflag_full($mbox, $_SESSION['unread_list'][$_SESSION['curr_index']], "\\Seen");
 }
 $_SESSION['curr_index'] = $_SESSION['curr_index'] + 1;
 // get next message
 if ($_SESSION['curr_index'] == count($_SESSION['unread_list'])) {
     // we have reached the end of the list of unread messages. What do to now?
     echo '<div class="message">end of triage!</div>';
     $temp = count(imap_search($mbox, 'UNSEEN'));
     if (imap_search($mbox, 'UNSEEN')) {
         echo '<div>There ' . pluralize('is', $temp) . ' ' . $temp . ' messages still un-read</div>';
         echo '<div>You you wish to QUIT or Triage the remaining ' . pluralize('message', $temp) . '?</div>';
     }
     renderLogout($device, $lang);
开发者ID:TheProjecter,项目名称:triagemail,代码行数:31,代码来源:triagemail.php


示例20: SendMail


//.........这里部分代码省略.........
             $headers .= "\n";
         }
         $headers .= 'From: ' . $v;
     }
     // set "Return-Path" header if not set on the device
     if (IMAP_DEFAULTFROM && !$returnPathSet) {
         if (IMAP_DEFAULTFROM == 'username') {
             $v = $this->_username;
         } else {
             if (IMAP_DEFAULTFROM == 'domain') {
                 $v = $this->_domain;
             } else {
                 $v = $this->_username . IMAP_DEFAULTFROM;
             }
         }
         if ($headers) {
             $headers .= "\n";
         }
         $headers .= 'Return-Path: ' . $v;
     }
     // if this is a multipart message with a boundary, we must use the original body
     if ($use_orgbody) {
         list(, $body) = $mobj->_splitBodyHeader($rfc822);
     } else {
         $body = $this->getBody($message);
     }
     // reply
     if (isset($reply) && isset($parent) && $reply && $parent) {
         $this->imap_reopenFolder($parent);
         // receive entire mail (header + body) to decode body correctly
         $origmail = @imap_fetchheader($this->_mbox, $reply, FT_PREFETCHTEXT | FT_UID) . @imap_body($this->_mbox, $reply, FT_PEEK | FT_UID);
         $mobj2 = new Mail_mimeDecode($origmail);
         // receive only body
         $body .= $this->getBody($mobj2->decode(array('decode_headers' => false, 'decode_bodies' => true, 'include_bodies 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP imap_mail_copy函数代码示例发布时间:2022-05-15
下一篇:
PHP imap_list函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap