I'm working on a registration page using perl/cgi. Part of the registration process involves sending the user an email with a confirmation code. In my tests, this email frequently gets dumped into the spam folder! Here's a snippet to illustrate what I'm doing to send the email:

use strict; my $sendmail = "/usr/sbin/sendmail -t"; my $from = 'me@mycompany.com'; my $to = 'you@yourcompany.com'; my $reply_to = 'me@mycompany.com'; my $subject = "Subject goes here"; my $body = "Body goes here."; open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL "From: $from\n"; print SENDMAIL "To: $to\n"; print SENDMAIL "Reply-to: $reply_to\n"; print SENDMAIL "Subject: $subject\n"; print SENDMAIL "Content-type: text/plain\n\n"; print SENDMAIL $body; close(SENDMAIL);

I apologize if this seems off-topic, but perl is used a lot for this type of thing, and I'm hoping someone here knows a tip or trick (maybe some obscure field to use in the header?) that would make a short confirmation email look more legitimate, and less like spam.

Thanks!


In reply to How can I prevent my email from looking like spam? by scorpio17

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.