Plugin Directory

Changeset 444855


Ignore:
Timestamp:
09/28/2011 04:11:44 PM (14 years ago)
Author:
gotic
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • xmail-the-right-way/trunk/xmail.php

    r441345 r444855  
    44Plugin URI: http://www.endd.eu/xmail-email-the-right-way/
    55Description: 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.01
     6Version: 1.03
    77Author: Marian Vlad-Marian
    88Author URI: http://www.lantian.eu/
     
    7979      $message .= "--".$boundary2."--\n\n";
    8080     
     81      $size = 0;
    8182      if(is_array($attachments)) {
    8283        foreach($attachments AS $file_url) {
     
    8485            $file_name = pathinfo($file_url, PATHINFO_BASENAME);
    8586            $file_type = $this->find_mime(pathinfo($file_url, PATHINFO_EXTENSION));
     87           
     88            $size = $size + filesize($file_url);
    8689           
    8790            # ATTACHMENT
     
    111114      $headers .= "Content-Type: multipart/mixed;\n      boundary=\"$boundary1\"\n";
    112115     
    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;
    114119    }
    115120   
     
    136141      fputs($socket, "RCPT TO: <" . $to . ">" . $this->line);
    137142      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      }
    138149       
    139150            # send data start command
Note: See TracChangeset for help on using the changeset viewer.