o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

CGI (Perl) - SMTP & Rediret Method -

Good day !

I have written the codes below and try to execute it. Theoritically, I suppose it works but it doesn't. I can't figure out what's wrong with my codes.

The 2 problems are :

1) It supposed to send back a mail to me but it doesn't. I used the code from Deitel & Deitel text book.

2) It doesn't redirect to the page "default.asp" after executing the commands. May be I had put the code at the wrong place ?

Anybody can look at my code and tell me what's wrong ?

Thanks a lot !

--------------------------------------------------------------------------------
use Net::SMTP;
use CGI qw/:standard/;

my $to = "chboo81@hotmail.com";
my $from = "chboo81@hotmail.com";
my $subject = param ("SelectPurpose");
my $message = param ("TxtMessage");
my $mailserver = "hotmail.com";

print header;
print "<p>Your message has been sent !";
print "Thank you for your contribution !";

$smtp = Net::SMTP->new($mailserver);
$smtp->mail($ENV{USER});
$smtp->to("$to");
$smtp->data();
$smtp->datasend("To : $to \n");
$smtp->datasend("From : $from \n");
$smtp->datasend("Subject: $subject \n");
$smtp->datasend("\n");
$smtp->datasend("$message \n");
$smtp->datasend();

$smtp->quit;

print redirect('../default.asp');

-----------------------------------------------------------------------------

Thanks again !

SonicWave

 

CGI (Perl) - SMTP & Rediret Method -
Good day ! I have written the codes below and try to execute it. Theoritically, I suppose it works but it doesn't. I can't figure out what's wrong with my codes. The 2 problems are : 1) It supposed to send back a mail to me but it doesn't. I used the code from Deitel & Dei


CGI/PERL vs. PHP, which one is better -
what are the PRO's and CON's of PERL vs. PHP? I already know CGI/PERL but know a little PHP, and i was wondering which one you think is better, and why? i have heard that PHP is more secure than CGI/PERL, but not sure. any seggestions/comments/oppinions?


Need help with this perlscript -
I need to send an E-mail from my web page and it's finished execpt for the send mail. I 've try to use CDONtS but it's not configured on the server and the admin doesn't want to set it (don't ask me why!). So i have found a perlscript for ASP that respond to mail send to your acc


Perl scripts cause Internal Server Errors -
I think there needs to be another slash in front of 'usr'. If you don't know where perl is located, type 'which perl' or 'whereis perl' at the command line to see.


POP3 Webmail wrapper (off topic) -
Anybody recommend a good Perl (ugh!) webmail POP3/SMTP wrapper? Nothing fancy like folders and address books, just a plain old mail wrapper. I've tried a few, but mostly they are buggy or screw up attachments. Alternatively, is there a Perl equivalent of VB Q & A? Than


POP3 Mail Wrapper (off topic) -
Anybody recommend a good Perl (ugh!) webmail POP3/SMTP wrapper? Nothing fancy like folders and address books, just a plain old mail wrapper. I've tried a few, but mostly they are buggy or screw up attachments. Alternatively, is there a Perl equivalent of VB Q & A? T


I want a good PERL interface -
I want a nice PERL interface for windows that will allow me to desing and test my PERL CGI programs without using unix. I have tried perl builder but it is giving me serioius problems. please advise me...


how to store value of a text box in a perl variable -
I am a beginner in Perl. Can anyone show me a few lines of sample code on how to store the value of a text box in a perl variable? I want to store the value the user entered in a form in a Perl variable after he clicks on the submit button (assuming my page submits to a perl script).


Please help SMTP server authentication -
Hello, I am using System.Web.Mail.MailMessage method to send email It works fine as long as SMTP server does not require authentication Does any body now the way to authenticate SMTP server Please help


Perl Tutorial -
is anyone Aware of a good site Like ASP101.com but for Perl ?? For Perl beginners


Get Smtp -
I got this code that sends email using SMTP. I was wondering if there was a way to detect their SMTP server that they have on their computer... or some way of getting it from their computer without having to ask them, because the average joe doesn't know what the hell SMTP means...


Perl Execute Perl Script -
I want to run one perl script like this Script.pl?one=one&two=two from the first perl script.. I cant figure out a good way to do this.. I tried system() print qx|url|; and use URI; my $url = URI->new('' ); Any ideas? Thanks!!


unable to Send Mail through Vbscript -
<BODY> <% Set SMTP = CreateObject("EasyMail.SMTP.6") SMTP.MailServer = "<the serveraddress>" SMTP.FromAddr = "<from address>" SMTP.AddRecipient "", "chandana.sameera@ge.com", 1 SMTP.Subject = &q


How do you reference pre-existing objects from a DLL -
Desperate, need Help! I can't figure out to reference an already created object. Here's what I did. I created a DLL with a form(frmWsk) and a class module (Smtp). I defined a bunch of public properties and one method in my class: 'Class module(Smtp.cls) in Active X DLL


php vs perl -
i need to make cgi. please give me reasons for what is better: php or perl? for what is php and for what is perl? thanks!


Perl and PWS -
How do you install Perl so it can be used with PWS? I'm using active perl from activestate.com.


SMTP gmail -
hi I have looked at every post here and elsewhere i can find regrading sending a message via gmails SMTP. 1 post insisted you have to use the ip instead of "smtp.gmail.com" but that dosn't seem to work for me. This is what i have been trying without any luck


Iis Smtp -
hi, not sure if i'm in the right category. but anyway i've some doubts regarding IIS SMTP. I'm new to ASP and IIS SMTP. I'm currently creating forms using ASP to send mails. My web server is running IIS, so i've decided to send email using SMTP since it already comes with IIS.


[2005] My.Settings... -
I'm trying to save a string to the settings of my project... however when i restart my computer it's not saved... works fine while running but stop the program and it's gone... Code: Dim smtp As String smtp = InputBox("Please enter your SMTP address, this will be


[2008] perl vs .net -
Not specifically Vb based but this form gets more traffic that the others. Is there anything that you can do in vb.net that you can not do in perl. I have been running an arms race between one of my buddies at work that does perl primarily to out do the other but i just wanted


using VBScript and Perl together -
my perl teacher from tafe wants us to write a script in perl to convert a decimal number to a binary number, pritty simply stuff the next step is to create a VBScript that promps user for a number and then sends that number to The Perl script(modified of course) the perl script d


Perl in VB -
Does anyone here know if there is a way to use a perl script as a module for VB? For example.. Have a perl script.. sub add { my (a,b) = @_; return a+b; } ... And in Vb be able to call it with simply.. MsgBox add(1,2) ..or something.. This is just a simple example.


[2005] SMTP mailserver -
Is there any way to send with Visual Basic an e-mail message without connecting to a SMTP server? Or is there a public SMTP server whereto I can connect? because not everyone who uses my program does have IIS with the SMTP installed with Windows XP PRO


Smtp -
I can't find a decent SMTP server for windows, so I decided to code one. I read the RFC and I just dont understand the most of it, is there any open source VB SMTP servers out there?!


Perl Check for new MailScript -
I need to get a Script up and Running in Perl that checks if Ive new emails on my Hotmail account. But, since I've NO idea how to check this. (With Any language) I'd got a problem just before Id started coding. Can someone give me some links so I can learn something about how this w


Internet EXE's -
Is it possible to write and EXE that can used on the net very much like you use a perl script ? I know its possible to do it in C, but i can see the runtimes being an issue... Also would the EXE use the Servers Runtimes or would the user have to have them on there machine ? Ha


Working with the Shell Command -
When I write a batch file like this: set path=\\fsstore03\vol2\pvcs\utilities\perl\bin;%PATH% perl findxp.pl DOS adds to my path the bin for the PERL language and the perl script runs fine, however, when I try to use VB like this: shell ("set path=\\fsstore03\vol2\pvcs\u


How do you get VBscript to call a perl script and then process the output -
my perl teacher from tafe wants us to write a script in perl to convert a decimal number to a binary number, pritty simply stuff the next step is to create a VBScript that promps user for a number and then sends that number to The Perl script(modified of course) the perl script d


How To Read "\n" From Perl Script -
I have developed a program that interacts with a perl script on my webserver. The program posts data to the perl script then the perl script checks the data and splits each string i sent using "\n". "\n" is a newline in c++ and perl but it seems there different. it


How to install perl -
I need to compile perl on my pc(want to test Ubb with apache here) and i am runing windows(already did it on linux) can anyone help me plz? i got the ubb the apache(installed and running) now i got more 3 directories with some stuff *.pm and .pl(perl files) and i cant run.. i need to


Perl to VB (RegExp) - Is it possible -
HI, I want to use some powerfull functionnality of Perl in a VB app. There's a way to "emulate" that code or something like this? In the best of world, the client does not need to have Perl installed on his computer. Some API available? Some code example or clue wi


SMTP Configuration -
So I have a working web program that allows a user to request a lost password and it emails them a randomly generated new one...sort of. The email function works fine using a CDO method. My problem is that i have allowed too much access to smtp and have mass evidence that my SMTP


A third-party app call in my app with ClickOnce -
I have a VB.NET application which will call some third-party executable, such as Perl. I want to deploy my application with ClickOnce. If Perl exe and its libs need to be included in my app project and deployed together with my application or the remote client which runs the app needs


Perl Catalyst Getting started -
Can anybody give tips on how to actually use catalyst? I'm stumped. I have ActivePerl and Apache and Catalyst setup... but I don't know how to use Perl. :| (or maybe i just need to know how to import packages and use that in the PERL programming language) huhuhu... like f


Incorporating Perl code to develop a forum -
I was assigned to create an online forum similar to this, using Perl. I've started creating my html form (that will ask a registered user to post his message) but I haven't gone further to incorporate Perl in it. Can anyone give me an idea how I will incorporate Perl code to develop


How to test Perl scripts -
I am a beginner in Perl. How I am going to test my Perl scripts to ensure that they are working as expected? Do I need some kind of a webserver? If I do, what server should I use?


SMTP Server in CDO -
I'm trying to send an email to a gmail address using CDO 2000 Library in Visual Basic 6. The problem is, I can't find a decent SMTP server. When I tried to use gmail's SMTP server (smtp.gmail.com) I got an error , -I believe- the cause of the error is Gmail's smtp server secuirty syste


SMTP Authentication -
When I try to connect with some SMTP modules I have to an SMTP server that requires authentication I obviously can't send mail... Does anyone have any solutions or some code to get around this? Thanks


Is it possible to write SMTP Server Software in VB.net -
Hello All, I have a question regarding SMTP. I would like to add a built in SMTP server to my application and was wondering if this is possible? If it is does anyone know where I can get some info on where to start with this? I'm guessing its a fairly complicated job. Regards Pa


[2005] How to use SMTP authentication -
Hello, i'm making an asp.net application and i don't know how to send mail via smtp, when MY SERVER REQUIRES SMTP AUTHENTICATION. could anyone help me how to do it?