in reply to Re: Mailer not mailing.
in thread Mailer not mailing.

Thank you for your quick response. I added your suggestions, but the results are still the same. it acts like it sent it and nothing is sent. here is the updated, full, code.
#!/usr/bin/perl use strict; use warnings; use CGI ":all"; use CGI::Carp qw(fatalsToBrowser set_message); BEGIN { sub handle_errors { my $msg = shift; print "<h1>ERROR</h1><br>"; print "$msg" } set_message(\&handle_errors); } open(MAIL,'|/usr/sbin/sendmail -oi -t') or die $!; print MAIL 'To: myemail\@myemail.com\n'; print MAIL 'From: serveremail\@theserver.com\n'; print MAIL 'Subject: Blah\n\n'; print MAIL 'Put main message in here.\n'; close (MAIL); print header, "hi";

Replies are listed 'Best First'.
Re: Re: Re: Mailer not mailing.
by Limbic~Region (Chancellor) on Jan 22, 2004 at 19:00 UTC
    toonski,
    You combined b10m and my suggestions. Either use single quotes which won't interpolate or escape the ampersands in the double quotes.

    it acts like it sent it and nothing is sent

    What do you mean? Are you saying there is no error messages but you do not receive the email? If that is the case, have you tried doing checking the mailq? Have you tried running the same process from the command line? You are not giving enough feedback to indicate what the problem is.

    Cheers - L~R

      Sorry. Yes, it acts like it send, as in no errors. I dont have a commandline, and I dont know what a mailq is. I wish I knew more about it. I took out the slashes, but the result hasnt changed. What is mailq?
        toonski,
        mailq is a program to display the messages in the queue that have not been delivered yet. If you do not have a command line to test with and you are not getting any errors your choices are pretty limited. You could find a new hosting company, you could try and just move the script somewhere with more flexibility like perlmonk.org, you could ask the hosting company's support to install a module or check the mail queue for you.

        Cheers - L~R