Forum Moderators: coopster & phranque

Message Too Old, No Replies

PERL : Wont Send to .co.uk

what have I done wrong?

         

Linark

7:38 am on Dec 23, 2002 (gmt 0)

10+ Year Member



#
#+------------------------------------------------------------------------------+#
#
sub send_email {

$email_addy = $your_email;
$email_addy =~ s/@/\@/;

if ($gallery_setup{send_admin_email} eq "Yes") {
open (MAIL, "¦/usr/lib/sendmail -t") ¦¦ die "Can't open Email Program!\n";
print MAIL "To: $gallery_setup{admin_email}\n";
print MAIL "From: $email_addy\n";
print MAIL "Subject: NEW : Gallery Membership\n\n";
print MAIL "To Admin Sir,\nYou have a new member at your wonderful website\n";
print MAIL "Below you will details, of there galley :\n";
print MAIL "Member No : $mid\nLogin / User Name : $user_name\nReal Name : $your_name\nEmail Address : $your_email\nModel : $model1\nSign up IP Address : $ip\n";
close (MAIL);
}

open (MAIL, "¦/usr/lib/sendmail -t") ¦¦ die "Can't open Email Program!\n";
print MAIL "To: $email_addy\n";
print MAIL "From: $gallery_setup{admin_email}\n";
print MAIL "Subject: Gallery Membership Details\n\n";
print MAIL "$mid¦$user_name¦$your_name¦$your_email¦$password¦$model1¦$ip¦\n";
close (MAIL);

open (MAIL, "¦/usr/lib/sendmail -t -oi") ¦¦ die "Can't open Email Program!\n";
print MAIL "To: <REMOVED .co.uk>\n";
print MAIL "From: $gallery_setup{admin_email}\n";
print MAIL "Subject: Just testing with Blank Email\n\n";
close (MAIL);

}
#
#+------------------------------------------------------------------------------+#
#

The above is my sub, for sending membership email to the admin of the my site, and the member who has signed up, the problem I have is that it won't send to a .co.uk email address, can you see what I have done wrong?

Thanks in advance for your help.

Mark.

seindal

10:15 am on Dec 23, 2002 (gmt 0)

10+ Year Member



It is more likely that the problem is in the mail system on the server than in your code.

If you can login on the server, try to send some mails from there to various addresses to see what happens.

On a sidenote, usually it is better to connect to an SMTP server and deliver the mail that way. It awoids forking a separate process to do it, so it will take fewer resources on the server. Net::SMPT is quite easy to use.

René.

Linark

12:46 pm on Dec 23, 2002 (gmt 0)

10+ Year Member



The problem is that my webhost doesn;t provide me with an SMTP server, so I would have to use sendmail wouldn't I?

It always works for a .com address :(