Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Sending mail via godaddy

by DanEllison (Beadle)
on Jan 20, 2012 at 14:50 UTC ( #948978=perlquestion: print w/replies, xml ) Need Help??
DanEllison has asked for the wisdom of the Perl Monks concerning the following question:

I have a site hosted by GoDaddy with e-mail accounts. I'm trying to send out an e-mail using Perl from my desktop, not from my host, and the outgoing e-mail appears to be sending, but is never received at the destination.

I should think if Outlook can do it, I should be able to do it.

Following is the code I am using with the debugging output following that.

#! /usr/bin/perl use strict; use Net::SMTP::SSL; my $smtp = Net::SMTP::SSL->new('', Port => 465 +, Hello => '', Debug => 1) or die $!; defined($smtp->auth('', 'xxxxxxxx')) or die $!; $smtp->mail('') or die $!; $smtp->to('') or die $!; $smtp->data or die $!; $smtp->datasend("From: me\") or die $!; $smtp->datasend("To: them\") or die $!; $smtp->datasend("Subject: This is a test") or die $!; $smtp->datasend("\n") or die $!; $smtp->datasend("This is test #1.\n") or die $!; $smtp->dataend or die $!; $smtp->quit or die $!; exit;
Net::SMTP::SSL>>> Net::SMTP::SSL(1.01) Net::SMTP::SSL>>> IO::Socket::SSL(1.22) Net::SMTP::SSL>>> IO::Socket::INET(1.31) Net::SMTP::SSL>>> IO::Socket(1.31) Net::SMTP::SSL>>> IO::Handle(1.28) Net::SMTP::SSL>>> Exporter(5.63) Net::SMTP::SSL>>> Net::Cmd(2.29) Net::SMTP::SSL=GLOB(0x353486c)<<< 220 ESMTP Net::SMTP::SSL=GLOB(0x353486c)>>> EHLO Net::SMTP::SSL=GLOB(0x353486c)<<< Net::SMTP::SSL=GLOB(0x353486c)<<< 250-AUTH LOGIN PLAIN Net::SMTP::SSL=GLOB(0x353486c)<<< 250-8BITMIME Net::SMTP::SSL=GLOB(0x353486c)<<< 250 PIPELINING Net::SMTP::SSL=GLOB(0x353486c)>>> AUTH LOGIN Net::SMTP::SSL=GLOB(0x353486c)<<< 235 Authentication succeeded. Net::SMTP::SSL=GLOB(0x353486c)>>> MAIL FROM:<> Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Sender accepted. Net::SMTP::SSL=GLOB(0x353486c)>>> RCPT TO:<> Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Recipient accepted. Net::SMTP::SSL=GLOB(0x353486c)>>> DATA Net::SMTP::SSL=GLOB(0x353486c)<<< 354 End your message with a period. Net::SMTP::SSL=GLOB(0x353486c)>>> From: Net::SMTP::SSL=GLOB(0x353486c)>>> To: Net::SMTP::SSL=GLOB(0x353486c)>>> Subject: This is a test Net::SMTP::SSL=GLOB(0x353486c)>>> This is test #1. Net::SMTP::SSL=GLOB(0x353486c)>>> . Net::SMTP::SSL=GLOB(0x353486c)<<< 250 Accepted message qp 26296 bytes +251 Net::SMTP::SSL=GLOB(0x353486c)>>> QUIT Net::SMTP::SSL=GLOB(0x353486c)<<< 221 Good bye.

Replies are listed 'Best First'.
Re: Sending mail via godaddy
by DanEllison (Beadle) on Jan 20, 2012 at 15:11 UTC

    I just love how this site works. I screw with this thing for two days, post my question, and then solve it myself five minutes later.

    I changed the target address to another account I had and found my e-mails in the spam folder. Apparently the previous target account wasn't going to let me know I was getting junk mail.

    Anyway, I found the To: From: and Subject: all on the same line, so putting newline characters (\n) at the end of each datasend call fixed the problem.

      I am just starting to migrate our perl stuff to Go Daddy. Could you share a small "Hello World" type amount of code showing how you have Net::SMTP running on Go Daddy? It would save me a lot of trial and error I think. Thanks! Steve

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://948978]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-04-28 08:20 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (519 votes). Check out past polls.