[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] asking for allot - need cgi pro



Hello,

> we have a script we actualy paid $79.00 for that will let people add
change
> and update contend on a web page from their own browser -
>
> i need to add a function to the script -
>
> i need to add e-mailing me upon web page mods -
>
> here is a link to the functioning script
>
> http://www.netbloomsdirect.com/my_flower_shop.html
>
> here is the snippet i was given to make the script work
<snip>
> when i insert this snippet with the wrong path the script still works but
> the email does not
>
> when i change the script to reflect the correct path, all i get is
internal
> server error
>
> # --- begin ---
> $mailprog  ='/usr/lib/sendmail';  # change this if necessary
> $to_addr   ='user@xxxxxxxxxxxx';  # your email address
> $from_addr ='anonymous@xxxxxxxx'; # who this will come from
> $to_subject='Whatever you want';  # subject of email
>
> open (MAIL, "|$mailprog $recipient") || die "sendmail error\n";
> print MAIL "From: $from_addr\n";
> print MAIL "To: $to_addr\n";
> print MAIL "Subject: $to_subject\n\n";
> print MAIL " $FORM{'HOMELINK'} was updated\n";
> close (MAIL);
> # --- end ---
<snip>

Change the $mailprog line to the correct path:
$mailprog  ='/usr/sbin/sendmail';  # change this if necessary

Change the sendmail line to read:
open (MAIL, "|$mailprog -t") || die "sendmail error\n";

Ensure that both the $from_addr and $to_addr are email addresses that do
exist. If you have any more problems, email me offlist and we can sort it
out for you.

Regards,
Jonathan Michaelson