Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 August 8th, 2012, 05:41 AM
andreas.london andreas.london is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 64 andreas.london User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 6 m 55 sec
Reputation Power: 1
Problem with sending email

hi guys, i used many different codes but no one worked for me. can anyone give me any idea how can i do it??

thanks

Code:
use Mail::Sendmail;  sendmail
(     
From    => 'mail1.bskyb.com',     
To      => 'myemail@hotmail.com',     
Subject => 'some subject',     
Message => "body of the message", 
);




Code:
use MIME::Lite;  
my $msg = MIME::Lite->new
(    
 From    => 'me@myhost.com',     
To      => 'you@yourhost.com',     
Cc      => 'some@other.com, some@more.com',     
Subject => 'A message with 2 parts...',    
Type    => 'multipart/mixed', 
);  
$msg->attach(     
Type     => 'TEXT',     
Data     => "Here's the GIF file you wanted", 
);  
$msg->attach(     
Type     => 'image/gif',     
Path     => 'aaa000123.gif',     
Filename => 'logo.gif', ); 
 $msg->send;




Code:
#!/usr/bin/perl   
use strict; 
 use warnings;  
use MIME::Lite::TT::HTML;   
my %params;   
$params{first_name} = 'Frank';  
$params{last_name}  = 'Wiles';  
$params{amt_due}    = '24.99';   
my %options;  
$options{INCLUDE_PATH} = '/path/to/templates';   
my $msg = MIME::Lite::TT::HTML->new(             
From        =>  'admin@example.com',             
To          =>  'frank@example.com',            
Subject     =>  'Your recent purchase',            
TmplOptions =>  \%options,             
TmplParams  =>  \%params,  );   
$msg->send;

Reply With Quote
  #2  
Old August 9th, 2012, 06:26 AM
OmegaZero OmegaZero is online now
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2007
Posts: 738 OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 6 h 17 m 34 sec
Reputation Power: 928
What errors are you getting?

Can you use "sendmail" from the command line?

If not, you'll need to fix that first, or use a module that speaks SMTP. I've had success with Mail::Transport::SMTP.
__________________
sub{*{$::{$_}}{CODE}==$_[0]&& print for(%:: )}->(\&Meh);

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Problem with sending email

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap