Google recently implemented additional SPAM filtering mechanisms whereby they will check whether a message conforms to the IETF RFC 2822 specification (the spec defines the ‘email message standard’). The IETF specification can be viewed here ->

When writing your Perl scripts you might get something back like the following when trying to send a mail to a GMAIL address:

The following message to <someemailaddress> was undeliverable.
The reason for the problem:
5.3.0 - Other mail system problem 550-'5.7.1 [      11] Our system has detected that this message is\n5.7.1 not RFC 2822 compliant. To reduce the amount of spam sent to Gmail,\n5.7.1 this message has been blocked. Please review\n5.7.1 RFC 2822 specifications for more information. bc3si6864125wjc.158 - gsmtp'

The fix is relatively simple (if it is in fact your problem): specify as many fields as possible when building your message object. Fields like from and subject were considered ‘optional’ in the past (older, pre RFC 2822, spec) but that is no longer true. Even a mail client like Thunderbird or Outlook fills in values (albeit sometimes blank) to make your email go through properly and not be cast out via SPAM filtering
Continue reading


I tried using SOAP::Lite with Perl recently and kept getting the following error on my server when trying to execute my Perl script:$ ./
Can't locate Class/ in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/ hare/perl/5.10.1/SOAP/ line 435.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/SOAP/ line 435.
Compilation failed in require at ./ line 3.
BEGIN failed--compilation aborted at ./ line 3.

The solution was quite simple, although finding it on the internet was not as simple.

Just do the following to install the required class:

sudo apt-get install libclass-inspector-perl

Voila, it’s working as expected.

If you are using RHEL or CentOS, you could do the following (I did not test this but found it at this link :

yum install 'perl(Class::Inspector)'

Hope this helps someone out there!