Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16921
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: mail() function doesn't send email; mistakes in the code |
| Date | 2016-08-05 23:02 +0200 |
| Message-ID | <e0kd6cF14feU1@mid.individual.net> (permalink) |
| References | <0d3735d9-7ed7-46f6-81e2-98ec7d5e85e0@googlegroups.com> <e0il1aFi4e1U1@mid.individual.net> <no27mj$d42$2@jstuckle.eternal-september.org> |
On 08/05/16 16:26, Jerry Stuckle wrote:
> On 8/5/2016 1:03 AM, J.O. Aho wrote:
>> On 08/04/16 08:56, Alla wrote:
>>> Hello!
>>>
>>> Please, take a look at the code below. I will be grateful for your help on why the code doesn't
>>> work - I have tested it, but the email doesn't arrive. All other parts of the code are correct,
>>> because these have been tested many times in other related files, i.e. those are templates.
>>>
>>> if(mail($email, $email_subject, $email_body))
>>> {
>>> // render form
>>> render("email_link_form.php", ["email" => $email]);
>>> }
>>
>> The only time mail() will give you a false is when it fails to connect
>> to the SMTP service configured in the php.ini.
>>
>
> I forgot to add - that is true - but if PHP does connect to the MTA,
> then there will be information in the MTA's log showing what happened.
Yes, but only if you have access to the logs will you be able to figure
out if it's the sending or receiving MTA which has blocked the mail and
for most shared hostings you don't have access to mail logs.
--
//Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mail() function doesn't send email; mistakes in the code Alla <modelling.data@gmail.com> - 2016-08-03 23:56 -0700
Re: mail() function doesn't send email; mistakes in the code "R.Wieser" <address@not.available> - 2016-08-04 12:39 +0200
Re: mail() function doesn't send email; mistakes in the code Alla <modelling.data@gmail.com> - 2016-08-05 07:04 -0700
Re: mail() function doesn't send email; mistakes in the code Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-04 13:30 -0400
Re: mail() function doesn't send email; mistakes in the code Alla <modelling.data@gmail.com> - 2016-08-05 07:07 -0700
Re: mail() function doesn't send email; mistakes in the code Eli the Bearded <*@eli.users.panix.com> - 2016-08-04 20:27 +0000
Re: mail() function doesn't send email; mistakes in the code Alla <modelling.data@gmail.com> - 2016-08-05 07:06 -0700
Re: mail() function doesn't send email; mistakes in the code "J.O. Aho" <user@example.net> - 2016-08-05 07:03 +0200
Re: mail() function doesn't send email; mistakes in the code Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-05 10:24 -0400
Re: mail() function doesn't send email; mistakes in the code Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-05 10:26 -0400
Re: mail() function doesn't send email; mistakes in the code "J.O. Aho" <user@example.net> - 2016-08-05 23:02 +0200
Re: mail() function doesn't send email; mistakes in the code Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-05 19:39 -0400
csiph-web