Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #3237

Re: problem sending email.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: problem sending email.
Date Thu, 29 Sep 2011 10:32:09 -0500
Organization A noiseless patient Spider
Lines 21
Message-ID <slrnj893rp.hbg.hellsop@nibelheim.ninehells.com> (permalink)
References <b64745c5-47d7-4322-8a1a-a4fc24bb85bf@g29g2000yqh.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="10665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BQo0wz0IUpaea4TrwYIIQ"
User-Agent slrn/0.9.9p1 (OpenBSD)
Cancel-Lock sha1:ygdnVZxS7r+azuR1kDoptavCZ9I=
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:3237

Show key headers only | View raw


On Thu, 29 Sep 2011 06:18:55 -0700 (PDT), Integrated HR Solutions wrote:
> // create email headers
> $headers = 'From : '.$email_from."\r\n".
> 'X-Mailer: PHP/' . phpversion();
> @mail($email_to, $email_subject, $email_message, $headers);
> ?>
[...]
> ___________________________________________________
>
> somehow this doesn't work. It doesn't send the emails.
>
> Where is the problem in this code?

See that @ at the front of the mail function? That's suppessing some
possible error messages. Take that off. You should be catching errors in
your code, not hiding them.

-- 
90. I will not design my Main Control Room so that every workstation is
    facing away from the door.
	--Peter Anspach's list of things to do as an Evil Overlord

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

problem sending email. Integrated HR Solutions <ihrsolutions2011@gmail.com> - 2011-09-29 06:18 -0700
  Re: problem sending email. The Natural Philosopher <tnp@invalid.invalid> - 2011-09-29 16:07 +0100
  Re: problem sending email. "Peter H. Coffin" <hellsop@ninehells.com> - 2011-09-29 10:32 -0500

csiph-web