Solved

Sendmail isn't working like it's supposed to...

Posted on 2002-04-11
3
151 Views
Last Modified: 2010-03-05
Okay, here's the deal.  I've got a site on Hypermart and they say "The mail program is located at /var/qmail/bin/qmail-inject. You would use it the same way you use 'SendMail', by piping things into it."  So I throw this code into a perl script towards the top where it'll be sure to be run.  I access the script, but don't get any email.  What's my problem?

open(MAIL, "|/var/qmail/bin/qmail-inject -t") or print "ERROR, DUDE!";
print MAIL "To: assignat@yahoo.com\n";
print MAIL "From: assignat@yahoo.com\n";
print MAIL "Subject: This is lovely, eh?\n";
print MAIL "What do you think?  Did this work?  Huh?\n\n-Brian\n";
close(MAIL);

-Brian
0
Comment
Question by:pyrames
  • 2
3 Comments
 

Author Comment

by:pyrames
Comment Utility
Anyone?
0
 
LVL 84

Accepted Solution

by:
ozo earned 300 total points
Comment Utility
In string, @yahoo now must be written as \@yahoo at - line 1, near "To: assignat@yahoo" (#1)
   
    (F) It used to be that Perl would try to guess whether you wanted an
    array interpolated or a literal @.  It did this when the string was first
    used at runtime.  Now strings are parsed at compile time, and ambiguous
    instances of @ must be disambiguated, either by prepending a backslash to
    indicate a literal, or by declaring (or using) the array within the
    program before the string (lexically).  (Someday it will simply assume
    that an unbackslashed @ interpolates an array.)
0
 

Author Comment

by:pyrames
Comment Utility
See?  I knew it was an easy answer!  I just wasn't seeing it...

Thanks!
-Brian
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Uploading Binary Data using Perl 5 70
compress files in RAR using perl 13 73
stftime format 4 51
Perl script not writing to .csv file 6 99
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now