use strict; use warnings; use Net::SMTP ; my $afz = 'anyone@gmx.com'; my $pass = 'somepass'; my $ontv = 'any@gmail.com'; my $mailer = Net::SMTP->new( 'mail.gmx.com', Hello => 'mail.gmx.com', Port => 587, Debug => 1 ); $mailer->starttls(); $mailer->auth($afz, $pass); $mailer->mail($afz); $mailer->recipient($ontv); $mailer->data(); $mailer->datasend("From: $afz"); $mailer->datasend("To: $ontv"); $mailer->datasend("Subject: testmail"); $mailer->datasend("\n"); $mailer->datasend("Hallo daar."); $mailer->dataend(); $mailer->quit #### C:\Strawberry\scripts>smtp.pl Net::SMTP>>> Net::SMTP(3.15) Net::SMTP>>> Net::Cmd(3.15) Net::SMTP>>> Exporter(5.79) Net::SMTP>>> IO::Socket::IP(0.43) Net::SMTP>>> IO::Socket(1.55) Net::SMTP>>> IO::Handle(1.55) Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 220 gmx.net (mrgmx004) Nemesis ESMTP Service ready Net::SMTP=GLOB(0x1d5ecdf64b8)>>> EHLO mail.gmx.com Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 250-gmx.net Hello mail.gmx.com [128.85.234.120] Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 250-8BITMIME Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 250-SIZE 141557760 Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 250 STARTTLS Net::SMTP=GLOB(0x1d5ecdf64b8)>>> STARTTLS Net::SMTP=GLOB(0x1d5ecdf64b8)<<< 220 OK Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> EHLO mail.gmx.com Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250-gmx.net Hello mail.gmx.com [128.85.234.120] Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250-8BITMIME Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250-AUTH PLAIN LOGIN Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250 SIZE 141557760 Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> AUTH PLAIN YW5keWFuZW1whYXRAerZ214LmNvbQBhbmR5YW5lbWFhdEBnbXguY29tAGtpZGRvMm1hbg== Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 235 Authentication succeeded Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> MAIL FROM: Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250 Requested mail action okay, completed Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> RCPT TO: Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 250 OK Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> DATA Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 354 Start mail input; end with . Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> From: anyone@gmx.com Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> To: any@gmail.com Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> Subject: testmail Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> Hallo daar. Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> . Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 554-Transaction failed Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 554-Reject due to policy restrictions. Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 554 For explanation visit https://postmaster.gmx.net/en/case?c=hi&i=ip&v=178.85.237.120&r=1M4s4r-1vTArD3yPX-00BYlG Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)>>> QUIT Net::SMTP::_SSL=GLOB(0x1d5ecdf64b8)<<< 221 gmx.net Service closing transmission channel