[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New to list + SMTP authentication when sending email
- Subject: Re: New to list + SMTP authentication when sending email
- From: "Joshua D. Drake" <..hidden..>
- Date: Thu, 22 Jul 2010 21:23:06 -0700
> I think to send out the most professional looking invoices and such Ledgersmb
> should act as a email client, and have the option send mail to a smtp host on
> port 587. That way each business can send from there own email server.
And when the businesses mailserver is gmail (yes I am serious.). I think
there is some merit to the idea but from a technical perspective, not an
RFC perspective.
>
> The patch we are talking about is really small, I tried this in Mailer.pm:
>
> if ( ${LedgerSMB::Sysconfig::smtphost} ) {
> if ( ${LedgerSMB::Sysconfig::smtpauthmethod} ){
> $smtp = Net::SMTP::TLS->new( ${LedgerSMB::Sysconfig::smtphost},
> ${LedgerSMB::Sysconfig::smtpport},
> ${LedgerSMB::Sysconfig::smtpuser},
> ${LedgerSMB::Sysconfig::smtppass});
> $smtp->mail($self->{from});
> $smtp->to($self->{to});
> $smtp->cc($self->{cc});
> $smtp->bcc($self->{bcc});
>
> $smtp->data();
> $smtp->datasend( $msg->as_string() );
> $smtp->dataend();
> $smtp->quit;
>
> return $!;
> /end code
Sincerely,
Joshua D. Drake
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt