Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cgiemail

Status
Not open for further replies.

chonk

IS-IT--Management
Joined
May 23, 2001
Messages
2
Location
US
I have a question regarding cgiemail.
When I run cgiemail via a submission form on an html page, can I have 2 separate emails be sent (2 separate text file templates) when I submit 1 form?
 
Yeah.

You could just open a pipe out to the program twice. Then just send the two separate files and data that you want to send.

Make sure that you close the first pipe before you open the second.

Hope this helps.

-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
He just emailed me and this was my answer so if anyone else has a similar question or anyone sees a problem with it, just respond.

Thanks,
-Vic

[tt]
Here's how I would do it:

open(EMAIL, "| cgiemail.exe ") || die("failed to open first pipe: $!");
print EMAIL "To: someone@someone.com;
print EMAIL "From: me@someone.com";
print EMAIL "Subject: This is the subject";
close(EMAIL");

open(EMAIL, "| cgiemail.exe ") || die("failed to open first pipe: $!");
print EMAIL "To: someone@someone.com;
print EMAIL "From: me@someone.com";
print EMAIL "Subject: This is the subject";
close(EMAIL");
[/tt]

Although that won't send them at the same time, it will do it close enough
that any human will not be able to tell.

I assume that the cgiemail.exe program is a DOS program where you can send
command line options to it. For example:

C:\>cgiemail -send someone@someone.com
would send something to someone@someone.com.
If it does, then you need to include any of those necessary command lines in
the open() functions after the cgiemail.exe part.
vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top