I am using MIME::Lite
to send emails. I am not sending mails in bulk. I have the following code to send mail.
my $msg = MIME::Lite->new(
To => "$recipient_address",
From => "$sender_displayname <$sender_email>",
Subject => "$subject",
Type => "multipart/alternative",
);
my $att_text = MIME::Lite->new(
Type => 'text',
Data => $message_body_plain,
Encoding => 'quoted-printable',
);
$att_text->attr('content-type' => 'text/plain; charset=UTF-8');
$msg->attach($att_text);
my $att_html = MIME::Lite->new(
Type => 'text',
Data => $message_body_html,
Encoding => 'quoted-printable',
);
$att_html->attr('content-type' => 'text/html; charset=UTF-8');
$msg->attach($att_html);
When I send mails, in few domains, like Google, the email lands in SPAM folder, whereas in Yahoo, the mail appears in INBOX. I Googled and read the documentation provided by Google and found that if the email has the seigned-by/mailed-by headers, then the email is not filtered by SPAM filter.
Following is the text which I referred:
The authentication process tries to verify the real sender by looking at a message's authentication data. This data should be included in a message's "signed-by" or "mailed-by" headers (shown beneath the subject line when you look at a message's details). When the sender doesn't include this data, we can't be sure whether or not the message was forged. For example, a message might claim to be from a Gmail address, but we can't confirm that claim if the message doesn't have authentication data.
Please help!