Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 24th, 2001, 11:01 AM
Maglight Maglight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 67 Maglight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Help needed for using SMTP!

Hi,

i'm using a simple routine for sending mails:

Code:
sub sendemail {
        my ($to,$from,$subject,$message) = @_;
        open MAIL, "|$config{'sendmail'}";
        print MAIL "To: $to\nFrom: $from\nSubject: $subject\n\n$message\n\n";
        close MAIL;
}



In $config{'sendmail'} is the path to sendmail saved.

Now i'm trying to use additionally smtp - i thought adding anything like:

$config{'mailmethod'}

Here i'll save the choosen mailmethod (like 1 for sendmail and 2 for smtp) and than adding

$config{'smtp'}

with the name of the smtp-server into my config-file ...

Could anyone help me in using smtp without any additional perl-modules?

Thanks!

Reply With Quote
  #2  
Old September 24th, 2001, 12:54 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> In $config{'sendmail'} is the path to sendmail saved

If your MTA is Sendmail and not a sendmail wrapper, you need to should the -t switch.

>> Now i'm trying to use additionally smtp

For what reasons?

Reply With Quote
  #3  
Old September 24th, 2001, 07:10 PM
Maglight Maglight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 67 Maglight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Quote:
Originally posted by freebsd
[BFor what reasons? [/B]


For those cases where it has to run on nt-servers.

Reply With Quote
  #4  
Old September 25th, 2001, 02:19 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try Mail::Sender.

Synatx:

use Mail::Sender;
$sendmail = new Mail::Sender({from => "Maglight <$from>" , smtp => '12.34.56.78'}) || die &error("$Mail::Sender::Error");
$sendmail->MailMsg({to =>'$to', subject => '$subject', msg => "$message"});

If smtp => '12.34.56.78' is left out, it assumes to be localhost.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Help needed for using SMTP!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT