Local user "user" unknown on host "mail.smtpserver.com"
It seems to break on $email. The "user" that the error reports is the value of $email, so why isn't it sending the email?
Offer thank you for your reply, that was helpful!
Here's the code:
###################################### my $sender=Mail::Sender->new; if ($sender->MailMsg({ smtp => 'mail.smtpserver.com', from => '[EMAIL PROTECTED]', to => "$email", subject => 'test email', msg => 'testing email', auth => 'LOGIN', authid => 'username', authpwd => 'password', }) < 0) { die "$Mail::Sender::Error\n"; } print "Mail sent OK." ######################################
From: Offer Kaye <[EMAIL PROTECTED]>
Reply-To: Offer Kaye <[EMAIL PROTECTED]>
To: Perl Beginners <beginners@perl.org>
Subject: Re: using Mail::Sender
Date: Thu, 19 May 2005 13:39:54 +0300
MIME-Version: 1.0
Received: from lists.develooper.com ([63.251.223.186]) by mc7-f33.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 19 May 2005 03:40:02 -0700
Received: (qmail 27009 invoked by uid 514); 19 May 2005 10:39:59 -0000
Received: (qmail 27000 invoked from network); 19 May 2005 10:39:59 -0000
Received: from x1a.develooper.com (HELO x1.develooper.com) (216.52.237.111) by lists.develooper.com with SMTP; 19 May 2005 10:39:59 -0000
Received: (qmail 12391 invoked by uid 225); 19 May 2005 10:39:59 -0000
Received: (qmail 12379 invoked by alias); 19 May 2005 10:39:58 -0000
Received: pass (x1.develooper.com: domain of [EMAIL PROTECTED] designates 64.233.170.192 as permitted sender)
Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.192) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 19 May 2005 03:39:57 -0700
Received: by rproxy.gmail.com with SMTP id z35so203936rne for <beginners@perl.org>; Thu, 19 May 2005 03:39:54 -0700 (PDT)
Received: by 10.38.96.6 with SMTP id t6mr930291rnb; Thu, 19 May 2005 03:39:54 -0700 (PDT)
Received: by 10.38.181.35 with HTTP; Thu, 19 May 2005 03:39:54 -0700 (PDT)
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Post: <mailto:beginners@perl.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Id: <beginners.perl.org>
Delivered-To: mailing list beginners@perl.org
Delivered-To: beginners@perl.org
X-Spam-Status: No, hits=-2.5 required=8.0tests=BAYES_00,RCVD_BY_IP
X-Spam-Check-By: la.mx.develooper.com
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B8rPXwS0B1KoZ2FzOGjKR8lsqK/ITYI2FWtgzdaQ5tmAROABsY0hEQdNVNx+0N+xPNAV0VAYjYPuSQhqZ8g+Ms/lrT0/V95nat+DgISGgJEIXOS9fm8aAFwHJH7TaQOtAKAVPxdzmLFLoxv2QDt0OOM/T6XerR7p0yM69iFfn1Q=
References: <[EMAIL PROTECTED]>
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 19 May 2005 10:40:03.0785 (UTC) FILETIME=[1D948B90:01C55C5F]
On 5/19/05, Graeme McLaren wrote:
> Hi all, I'm wanting to use the Mail::Sender module. When sending emails
> I'll need to use an SMTP server. On CPAN I found the following in the
> documentation, is this all I would need to send email? What is the "auth"
> key for? Surely all you need is a host, username and password?
>
If indeed you are using a login method (username and password), then replace "NTLM" with LOGIN. So instead of:
> auth => 'NTLM',
Use:
> auth => 'LOGIN',
HTH, -- Offer Kaye
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>