Hello,
I am having a problem w/SendMail reporting: " No recipient addresses
found in header".
Funny thing is though, I properly recieve the email message.
Thanks for your help.
-jim
Here is the code:
sub my_send_mail
{
local($fromuser , $touser, $subject, $messagebody) = @_;
local($old_path ) = $ENV{"PATH"};
$ENV{"PATH"} = "";
$ENV{ENV} = "";
open(SENDMAIL, "| /bin/sendmail -t -n") || &web_error ("Unable to open
sendmail");
$ENV{"PATH"} = $old_path;
print SENDMAIL "To: $touser\n";
print SENDMAIL "From: $fromuser\n";
print SENDMAIL "Subject: $subject\n\n";
print SENDMAIL "$messagebody\n ";
close(SENDMAIL) ;
} 4 4014
jim <defenderjim4@n o__spam__juno.c om> wrote in message news:<D0******* *********@nwrdd c01.gnilink.net >... I am having a problem w/SendMail
So why are you posting to a (non-existant) newsgroup that is (or
rather would be if it existed) about Perl?
Here is the code:
That looks like it was written for Perl4. If it _was_ written for
Perl4 that's OK. But if this was written recently it implies the
author needs to update his Perl skills. sub my_send_mail { local($fromuser , $touser, $subject, $messagebody) = @_;
Do not use local() where you want my() unless you need your code to
run on Perl4. (You really should _not_ still be using Perl4).
local($old_path ) = $ENV{"PATH"};
$ENV{"PATH"} = "";
No! That's one place where you could use local!
local $ENV{PATH} = '';
$ENV{ENV} = "";
open(SENDMAIL, "| /bin/sendmail -t -n") || &web_error ("Unable to open sendmail");
The there's another switch that is almost alwats used with 'sendmail
-t' to disable dot handling (can't recall what it is). Why have you
omitted it?
Why is that & there?
Why don't you include the error in your error message?
$ENV{"PATH"} = $old_path;
You wouldn't need this if you'd used local.
Hey nobull,
Thanks for your reply.
The short story is I got it working. There was something in the body of
the message that it didnt like.
The long response follows: So why are you posting to a (non-existant) newsgroup that is (or
Well, if it is non-existent, then why are all these messages here?
That looks like it was written for Perl4. If it _was_ written for
Yeah, I think so. It is legacy code written by someone else and I have
had to work with it.
Perl4 that's OK.
Yeah, I think so, dont know the original author or history.
Do not use local() where you want my() unless you need your code to
No, does not need to run on perl4, changed above to my;
Note delimeter at end of previous sentance: I think I have been
programming too long when I end my sentences w/a semi colon.
Why have you omitted it?
Haven't, just trying to get someone else's code working.
Why don't you include the error in your error message?
Hhhmmm good point. Must have been late/tired.
jim <m4@no_spam_jun o.com> wrote in message news:<z%******* *********@nwrdd c02.gnilink.net >... So why are you posting to a (non-existant) newsgroup that is (or Well, if it is non-existent, then why are all these messages here?
Ignorance, incompetance and compassion.
For details, please see numerous previous theads.
jim <m4@no_spam_jun o.com> wrote in message news:<z%******* *********@nwrdd c02.gnilink.net >... The short story is I got it working. There was something in the body of the message that it didnt like.
A line starting with a dot perhaps?
[ Re the swich to disable special treament for lines starting with a dot.. ] Why have you omitted it? Haven't, just trying to get someone else's code working.
Have you tried adding it? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lawrence |
last post by:
We're installing a new server at the office and this will be the first
server we set up from which we host our website. We got tired of
dealing with Interland and decided to bring our hosting in-house. The
guy doing most of the work struggled with sendmail for awhile and then
gave up. Now he's installing Postit, or Postfix, or whatever it's
called.
Does the PHP mail function depend on sendmail, or can it use any mta
software?
|
by: Babaloo |
last post by:
Hello,
I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except
email.
I have a test script to send mail, I have sendmail_path =
'/usr/lib/sendmail -t -i' set in php.ini, sendmail can send mail from the
command line but if I use the script I get the following error on the http
log file:
|
by: Sumith Bandula |
last post by:
Hi all,
I am using a simple php script to send a mail.
<?php
if (mail($to, $sub, $message, $from))
echo "sent mail successfully<br>\n";
?>
It GOES $to = "me@localhost.localdomain"
|
by: Aaron Powell |
last post by:
I am writing a program for a study I am doing where I must contact several
different organisations stored in a database I compiled, but I need to send
each email one at a time so they don't know who else I sent to.
I tested my sendmail and it works well, but I am having a problem with chomp
in the case I am using it. When getting $email, if I do not say $email\n,
nothing will be displayed to the command prompt. This leads me to believe...
|
by: mike |
last post by:
I've spent a couple of days on this and I'm to the "bang-my-head
'gainst the monitor and babble in tongues" mode.
First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10
I have sendmail running on the local server - mail from unix (1) mail
and mutt work locally on the server. This is, specifically, sending
mail to a localhost user or another user off on the net somewhere
works fine.
| |
by: James Robertson |
last post by:
Issue is that I really do not know diddly. Copying and trying to learn as
much as I can about VB and ASP2.0. Now the question I have is I created an
E-Mail form the sendmail properties in the VB side are
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e
|
by: swangdb |
last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have
Majordomo and Listproc installed on this server and they work. I have
several production majordomo and listproc mailing lists installed on
this server and they work.
I am trying to get Mailman to work on this server and so far, no luck.
I installed the software (Mailman 2.1.8 and Python 2.4.3), reconfigured
mm_cfg.py, started the software, added the cron entries,...
|
by: Nilesh |
last post by:
I have a server in which sendmail gives problem. How do i change
php.ini so that i can use exim for mail()
System is FC-6.
|
by: Clodoaldo |
last post by:
I need to know if an email was refused for whatever reason, it makes
no difference.
The email is sent to an email address that does not exist in a foreign
domain. I can see in the postfix log that the email was sent and
bounced with the error code 550.
The problem is that sendmail should throw an exception but it does
not. And the returned dictionary is empty as if the email was
accepted.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |