?
Solved

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

Posted on 2002-04-11
3
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:pyrames
ID: 6936177
Anyone?
0
 
LVL 84

Accepted Solution

by:
ozo earned 1200 total points
ID: 6936192
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
ID: 6936872
See?  I knew it was an easy answer!  I just wasn't seeing it...

Thanks!
-Brian
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Six Sigma Control Plans
Suggested Courses

752 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