Changeset 444855
- Timestamp:
- 09/28/2011 04:11:44 PM (14 years ago)
- File:
-
- 1 edited
-
xmail-the-right-way/trunk/xmail.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xmail-the-right-way/trunk/xmail.php
r441345 r444855 4 4 Plugin URI: http://www.endd.eu/xmail-email-the-right-way/ 5 5 Description: Send email the right way so it does not get flagged as SPAM. Most servers use a diffrent IP address to send email from then the IP of your domain and thus your emails get into SPAM folders or not att all in some cases of Yahoo! and MSN. This will send emails from your domain IP address. It might take 1-2 seconds more to send it but it is worth it. 6 Version: 1.0 16 Version: 1.03 7 7 Author: Marian Vlad-Marian 8 8 Author URI: http://www.lantian.eu/ … … 79 79 $message .= "--".$boundary2."--\n\n"; 80 80 81 $size = 0; 81 82 if(is_array($attachments)) { 82 83 foreach($attachments AS $file_url) { … … 84 85 $file_name = pathinfo($file_url, PATHINFO_BASENAME); 85 86 $file_type = $this->find_mime(pathinfo($file_url, PATHINFO_EXTENSION)); 87 88 $size = $size + filesize($file_url); 86 89 87 90 # ATTACHMENT … … 111 114 $headers .= "Content-Type: multipart/mixed;\n boundary=\"$boundary1\"\n"; 112 115 113 return $this->sokmail($to, $subject, $message, $headers); 116 if($this->sokmail($to, $subject, $message, $headers)) return true; 117 else if(mail($to, $subject, $message, $headers)) return true; 118 else return false; 114 119 } 115 120 … … 136 141 fputs($socket, "RCPT TO: <" . $to . ">" . $this->line); 137 142 if($this->parse_response($socket, 250, "RCPT TO") != 250) { fclose($socket); return false; } 143 144 # size of attachments 145 if($size != 0){ 146 fputs($socket, "SIZE=" . $size . $this->line); 147 if($this->parse_response($socket, 250, "SIZE") != 250) { fclose($socket); return false; } 148 } 138 149 139 150 # send data start command
Note: See TracChangeset
for help on using the changeset viewer.