Previous Thread
Next Thread
Print Thread
Rate Thread
#102066 01/27/2001 9:45 PM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
open(MAIL, "|/usr/sbin/sendmail -t") or die "Can't Fork $!";
print MAIL "To: [email protected]";
print MAIL "From: $email1@$email2";
print MAIL "Subject: $name has registered with $cname";
close MAIL or die $!;

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

Sponsored Links
#102067 01/27/2001 10:15 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
What's the question?

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#102068 01/27/2001 10:22 PM
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
Quote
quote:
It looks fine...

------------------
[Linked Image]
Modification Developer of the Ultimate Bulletin Board
Due to time limitation, I do not offer support Via. E-mail, ICQ , AIM, Private message or any media.
Regards,
MasterMind

#102069 01/28/2001 10:52 AM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
I swear I typed: I dosen't send me an e-mail. It's a piece of a script I am working on. Oh and btw what is the message part?
print MAIL "Message: This is the message.";
Is that it?


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

#102070 01/28/2001 10:55 AM
Joined: Sep 2000
Posts: 138
Em8
Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
oh and $email1 would be like "jerry" and $email2 would be like "domain.com". $name would be like "Jerry" and $cname would be like "Chibi Goku". Its for an rpg for me and my friend.

So it would be (with the varibles defined except $!, duh.):

open(MAIL, "|/usr/sbin/sendmail -t") or die "Can't Fork $!";
print MAIL "To: [email protected]";
print MAIL "From: [email protected]";
print MAIL "Subject: Jerry has registered with Chibi Goku";
close MAIL or die $!;

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


This message has been edited by Em8 on January 28, 2001 at 09:58 AM

Sponsored Links
#102071 01/28/2001 1:25 PM
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
The body of the message is just printed after the headers. The UBB module mail-lib.pl/sub real_send_mail is an example.

#102072 01/28/2001 1:29 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
It looks fine to me.

It may not be working because you don't have a line printing the message (also you should have nn before printing the message)

Double check your path to sendmail. Is it not reporting back an error when opening the pipe to sendmail?

Also, sendmail could reject the email if [email protected] is not a valid email address. This is on yor system, so your MX file may need an entry for that email address. Change the from to a valid email address, and you can always put jerry's address in the body of the message or the reply-to area (assuming what you were tying to do was have them fill a form, and you get a confirmation email from the system, with their email addr in the from field)

Those are the quick ones I can think of.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#102073 01/28/2001 3:39 PM
Joined: Aug 2000
Posts: 53
Member
Member
Offline
Joined: Aug 2000
Posts: 53
Here is what I use on a script I wrote to send me an email everytime someone gets a server error on my site:

Code
code:

There you have it....


* Insert cliche' quote/sentence/image here *

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)