CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
GRRRRR! Why doesn't this work?

 



jacksonpt
Deleted

Jul 11, 2000, 9:33 AM

Post #1 of 3 (260 views)
GRRRRR! Why doesn't this work? Can't Post

OK, MIME::Lite documentation claims that it is a stand-alone module and that it requires nothing to use (no installation or anything). If that is the case, then why doesn't this work??? I have been tearing my hair out (and I didn't have much to begin with) for about 5 days now... what am I missing? I am sure it is something stupid that I just overlooking.

It is just a simple script to send a test text message, and display a confirmation, that's all. Eventually, I need it to send a text message with an HTML attacment, but let's crawl before I start trying to walk.

#!/usr/bin/perl

use MIME::Lite;

$msg = MIME::Lite->new(
From =>'jacksonpt@stny.rr.com',
To =>'jtaylor@binghamton.edu',
Subject =>'Testing MIMELite!',
Type =>'text',
Data =>'This is a test message'
);
$msg->send;
print "Content-type:text/html\n\n";
print "<br><br><br><br><center><font size=+1>Message Sent...<br><br>Thank you.</font></center>\n";


TheGame+
Deleted

Jul 13, 2000, 5:24 AM

Post #2 of 3 (260 views)
Re: GRRRRR! Why doesn't this work? [In reply to] Can't Post

Have you read the part about "Cheap and easy mailing" in the MIME::Lite documentation ?

It might be that the 'default' send() settings do not work on your server. Ask your admin - or check the FAQ if it's a webhosting company - where sendmail is located (if they support it) and what parameters should be used, or how mail should be sent from that server.


TStanley
Deleted

Jul 25, 2000, 8:44 AM

Post #3 of 3 (260 views)
Re: GRRRRR! Why doesn't this work? [In reply to] Can't Post

I have been having a similar problem, except I am trying to send a text file that has been created by the script. The name of the text file is in a scalar variable, but when I run the script, it goes all the way through, but I don't even receive an email. Here is the code:

use MIME::Lite;

$msg = MIME::Lite->new(
Fro=>'root@localhost.company.com',
To=>'myname@company.com',
Subject=>'Summary Report',
Type=>'multipart/mixed');

$msg->attach(Type=>'TEXT',
Data=>"Summary Report");

# THIS IS THE ACTUAL MESSAGE ATTACHMENT

$msg->attach(Type=>'TEXT',
Path=>'$rptname',
Filename=>'$rptname');

$msg->send;

Any suggestions would be greatly appreciated.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives