Current location: Hot Scripts Forums » Programming Languages » Perl » Attachement help needed


Attachement help needed

Reply
  #11 (permalink)  
Old 06-20-07, 02:49 PM
Drunken Perl Coder Drunken Perl Coder is offline
Wannabe Coder
 
Join Date: Aug 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Last edited by UnrealEd : Today at 05:17 AM. Reason: please use the [highlight=perl] tag when posting perl code
Please do not edit my posts anymore to add syntax highlighing. Thank you.
__________________
Mods: Please do not edit my posts to add syntax highlighting. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #12 (permalink)  
Old 06-21-07, 03:24 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
i am using email list to send email, that '$em' is consiting email address to whom this email will go.

but Reply-to part is working then why not 'Return-path' ???

Please tell me some solution, this method is very important for me. MIME::Lite is very good and easy. Return path is important. can we use old and new email code combined with to get both the effect properly? is this possible? on old code return path at the begining. on new code its not working. can you kindly execute the code on your machine with a single email address in place of "$em" and checj whether its working or not?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #13 (permalink)  
Old 06-21-07, 03:46 AM
Drunken Perl Coder Drunken Perl Coder is offline
Wannabe Coder
 
Join Date: Aug 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
You probably just need to add the brackets <> to the return path email address:

Return-Path => '<vikram\@k****ij.com>';
__________________
Mods: Please do not edit my posts to add syntax highlighting. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #14 (permalink)  
Old 06-21-07, 06:47 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Code:
$msg = MIME::Lite->new(
  Return-path =>'<sujata@k****ij.com>',
        To        => $em,
        From      =>'Vikram Murarka <vikram@k****ij.com>',
        Reply-To    =>'Vikram Murarka <vikram@k****ij.com>',
        Subject   => $subject,
  Type   =>'text',
  Data   => $message 
    );
    $msg->send; # send via default
i did above then also its not wokring, it not taking the return path at all.

i tried this also:

Return-path =>'<sujata\@k****ij.com>',

but no use.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #15 (permalink)  
Old 06-21-07, 03:38 PM
Drunken Perl Coder Drunken Perl Coder is offline
Wannabe Coder
 
Join Date: Aug 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Check the headers of an email you sent using MIME::Lite and see what the return-path header is being set as. I think by default it is set as the senders email address, but it should be set to whatever you define it as in the options hash of the new() method.
__________________
Mods: Please do not edit my posts to add syntax highlighting. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #16 (permalink)  
Old 06-22-07, 01:28 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
the return path value is : Return-Path:k****ijc@srv1.k****ij.com

this is default value when ever any return path does not work, email go to this root email address. now also it working and biounce email going to it only.

Yes, the problem was there also on old code that is why i used this one, because then also its not taking velue in 'Return-path' so i used this:

Code:
open MAIL, "| $mail_prog -finrreturn\@k****ij.com" || die "I was not able to open the mail program<BR>contact the server's technical administrator.<BR><BR>If this is not admin, please let him/her<BR> know about this problem.";
print MAIL "To: $em\n";
............................
close MAIL;
als i notice that return path should at the top of the header code then only it work, but this time its not. i thing it has some problem in syntax that is why it not taking and as well as not working.

i did this with bracket and without bracket '<>' but ressult is same:

Code:
  $msg = MIME::Lite->new(
  Return-path =>'sujata@k****ij.com',
        To        => $em,
        From      =>'Vikram Murarka <vikram@k****ij.com>',
        Reply-To    =>'Vikram Murarka <vikram@k****ij.com>',
        Subject   => $subject,
  Type   =>'text',
  Data   => $message 
    );
    $msg->send; # send via default
that is why i asked you can we combine both the code so that return path work?

Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #17 (permalink)  
Old 06-22-07, 02:20 AM
Drunken Perl Coder Drunken Perl Coder is offline
Wannabe Coder
 
Join Date: Aug 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
I think I have helped you as much as I can. To me, your code looks like it should work. I simply do not know why it doesn't.
__________________
Mods: Please do not edit my posts to add syntax highlighting. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #18 (permalink)  
Old 06-22-07, 08:46 AM
sujata_ghosh sujata_ghosh is offline
Wannabe Coder
 
Join Date: May 2006
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Hi!

yes you have helped a lot and teach me a new email process to use. finally i got the solution, return path is working now and here it is:

Code:
   $msg = MIME::Lite->new(
        From      =>'Vikram Murarka <vikram@k****ij.com>',
        To        => $em,
        Reply-To    =>'Vikram Murarka <vikram@k****ij.com>',
        Subject   => $subject,
   Type   =>'text',
  Data   => $message
    );
$msg->attach (
        Type      => 'application/msword',
        Encoding  => 'base64',
        Path      => '/home/k****ijc/www/com/colour of money 26may07.doc'
) or die "Error adding the text message part: $!\n";
    $msg->send("sendmail", "/usr/sbin/sendmail -t -finrreturn\@k****ij.com");; # send via default
i got it at here:
http://search.cpan.org/dist/MIME-Lite/lib/MIME/Lite.pm

sendmail and mime lite can be combine according to example at here.

Thanks again.

Last edited by sujata_ghosh; 06-22-07 at 08:48 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #19 (permalink)  
Old 06-22-07, 02:00 PM
Drunken Perl Coder Drunken Perl Coder is offline
Wannabe Coder
 
Join Date: Aug 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Very good. And you're welcome.
__________________
Mods: Please do not edit my posts to add syntax highlighting. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmer Needed for File hosting script! Fabolous Job Offers & Assistance 3 06-15-06 11:56 PM
Senior Programmer needed in Newport Beach, CA! DAMC123 Job Offers & Assistance 0 05-01-06 07:13 PM
Partner Needed for New Shoutcast Hosting Company HopesDespair Job Offers & Assistance 0 06-17-05 09:39 PM
Scripts Needed? ezcore General HotScripts Site Discussion 4 08-27-04 04:27 PM
will pay. php script needed. upload, resize, & email jamjammo Script Requests 4 02-29-04 09:30 PM


All times are GMT -5. The time now is 06:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.