SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Aug 2004
    Location
    thailand
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile How to set mail() not a spam mail

    Hi

    Would someone help me. I try to coding mail program php on function mail() but my mail is a spam mail . How can I set my mail not a spam mail?


    Thank you

  2. #2
    SitePoint Guru
    Join Date
    May 2004
    Location
    santa rosa, ca
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this how you are trying to send mail?

    mail(email,"sub","body","From: email\n");
    nondenominational, noncommercial, nonprofit,
    listener-supported, 24-hour, Christian ministry:
    Listen Live Online

  3. #3
    SitePoint Member
    Join Date
    Aug 2004
    Location
    thailand
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I use function mail();

    This is my code
    $to="satit@thaijoin.com";
    $subject = "News from thaijoin";
    $msg = "test test";
    $headers = "From: telemarketing@thaijoin.com\n";
    $headers.= "Reply-To: telemarketing@thaijoin.com\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "X-MSMail-Priority: High\n";
    $headers .= "X-Mailer: php\n";
    @mail("$to", "$subject", $msg, "$headers");

    Mail have report on header

    X-Spam-Level: ************
    X-Spam-Report:
    * 1.5 X_PRIORITY_HIGH Sent with 'X-Priority' set to high
    * 0.5 X_MSMAIL_PRIORITY_HIGH Sent with 'X-Msmail-Priority' set to high
    * 0.3 NO_REAL_NAME From: does not include a real name
    * 0.1 HTML_FONTCOLOR_BLUE BODY: HTML font color is blue
    * 0.2 HTML_MESSAGE BODY: HTML included in message
    * 2.8 HTML_IMAGE_ONLY_02 BODY: HTML: images with 0-200 bytes of words
    * 0.0 HTML_80_90 BODY: Message is 80% to 90% HTML
    * 0.3 HTML_FONT_BIG BODY: HTML has a big font
    * 0.7 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
    * 0.8 HTML_IMAGE_RATIO_04 BODY: HTML has a low ratio of text to image area
    * 3.6 SUBJ_ILLEGAL_CHARS Subject contains too many raw illegal characters
    * 1.8 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date
    * 0.1 MISSING_OUTLOOK_NAME Message looks like Outlook, but isn't
    * 1.1 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME headers
    * 0.6 MISSING_MIMEOLE Message has X-MSMail-Priority, but no X-MimeOLE
    * -1.5 AWL AWL: Auto-whitelist adjustment
    X-Spam-Status: Yes, hits=12.8 required=5.0 tests=AWL,DATE_IN_FUTURE_12_24,
    HTML_80_90,HTML_FONTCOLOR_BLUE,HTML_FONT_BIG,HTML_IMAGE_ONLY_02,
    HTML_IMAGE_RATIO_04,HTML_MESSAGE,MIME_HEADER_CTYPE_ONLY,
    MIME_HTML_ONLY,MISSING_MIMEOLE,MISSING_OUTLOOK_NAME,NO_REAL_NAME,
    SUBJ_ILLEGAL_CHARS,X_MSMAIL_PRIORITY_HIGH,X_PRIORITY_HIGH
    autolearn=spam version=2.60
    X-Spam-Flag: YES
    X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on
    ns3.ohohost.com

    Then some program delete my mail or check my mail is spam mail.

  4. #4
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to add some headers

    Do a search here or on google for "email headers". Also if your server happens to have a black listed IP address you might find emails from it get dumped.

  5. #5
    SitePoint Zealot lemkepf's Avatar
    Join Date
    Feb 2002
    Location
    WI, USA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It also doesn't help that you have the priority set to high. Most spam filters check that.

  6. #6
    SitePoint Addict pointbeing's Avatar
    Join Date
    Jun 2004
    Location
    London, UK
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also that it's an HTML email, and from an address with the word 'marketing' in the title.

    This seems to set your spam filter's alarm bells a-tinglin' too:

    * 0.3 NO_REAL_NAME From: does not include a real name

  7. #7
    SitePoint Zealot lemkepf's Avatar
    Join Date
    Feb 2002
    Location
    WI, USA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by satit
    * 2.8 HTML_IMAGE_ONLY_02 BODY: HTML: images with 0-200 bytes of words
    * 3.6 SUBJ_ILLEGAL_CHARS Subject contains too many raw illegal characters
    Those are 2 others that you really need to look at. Illegal charactesr, i'm not sure what those are. But having just images without words is bad. The more words the better.

  8. #8
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't help... with an email like that, he's up to no good.

    Idiot spammers. Hope you rot in hell.

  9. #9
    SitePoint Zealot lemkepf's Avatar
    Join Date
    Feb 2002
    Location
    WI, USA
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OfficeOfTheLaw
    I wouldn't help... with an email like that, he's up to no good.

    Idiot spammers. Hope you rot in hell.
    Sometimes people are just dumb with sending out email to a mailing list...
    But yea, I agree that spammers can rot too

  10. #10
    SitePoint Member
    Join Date
    Aug 2004
    Location
    thailand
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would like to send mail only my member and set for send mail support html then I try to set my real name and real ip for good mail not spam mail . If who know how to set you can send me direct my email.

    Thank you.

  11. #11
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by satit
    Yes, I use function mail();

    This is my code
    $to="satit@thaijoin.com";
    $subject = "News from thaijoin";
    $msg = "test test";
    $headers = "From: telemarketing@thaijoin.com\n";
    $headers.= "Reply-To: telemarketing@thaijoin.com\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "X-MSMail-Priority: High\n";
    $headers .= "X-Mailer: php\n";
    @mail("$to", "$subject", $msg, "$headers");
    The report present many complains but the most important are:

    - Do not fake Outlook headers as your PHP script is not Outlook and it easy to tell.
    - Compose HTML messsage properly. Do not just dump HTML tags in the message. HTML messages must always have an always have an alternative text part compose as multipart/alternative MIME type.
    - If your message contains non-ASCII characters, you need to use proper encoding.

    To save you a lot of time doing it all right according to the standards and without being rated as spam, you may want to try this message composing and sending class. It comes with examples of how to send HTML messages with non-ASCII characters properly.
    Manuel Lemos

    Metastorage - Data object relational mapping layer generator
    PHP Classes - Free ready to use OOP components in PHP

  12. #12
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpmailer is a very popular email class that makes it easy to construct html mails.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •