Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18607
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: problem figuring out why mail fails |
| Date | 2021-04-13 22:05 +0200 |
| Message-ID | <idmbs0F7hq7U1@mid.individual.net> (permalink) |
| References | <s54d0b$spc$1@gioia.aioe.org> |
On 13/04/2021 17.22, bill wrote: > I have a script that sends mail in a loop. Unfortunately it is sending > only the first. > Here is the script segment: As you don't have the whole code, it's just a guess when it comes to the problem. I would guess it's your headers that grows for each mail you try to send, also simpler to use an array with named cells, see php.net documentation. > Mail returns "false" for all sends after the first: > error_get_last returns nothing rather than the array expected There ain't any direct error in the PHP code, so error_get_last will not generate anything related to this, the false just indicates that the mail server rejected your mail for an unknown reason. Also keep in mind that true don't mean that the mail was sent, just that the mail server didn't throw an error. Please do not make this as a public web page as email sending tend to be a lot more to do than use the mail-function, you need to verify that all the data is in correct format, as it's simple to make header injections and your web page would then used by spammers until your web host kicks you out after the web server appears on blacklists. Also remember to not send mail to people who hasn't agreed on getting mail from you, you may otherwise commit a crime in multiple jurisdictions. -- //Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
problem figuring out why mail fails bill <william@TechServSys.com> - 2021-04-13 11:22 -0400
Re: problem figuring out why mail fails Jeroen Belleman <jeroen@nospam.please> - 2021-04-13 21:01 +0200
Re: problem figuring out why mail fails "J.O. Aho" <user@example.net> - 2021-04-13 22:05 +0200
Re: problem figuring out why mail fails bill <william@TechServSys.com> - 2021-04-16 08:33 -0400
Re: problem figuring out why mail fails Kristall <kristallin555@gmail.com> - 2023-02-27 02:40 -0800
Re: problem figuring out why mail fails Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-04-13 21:08 +0000
Re: problem figuring out why mail fails Arno Welzel <usenet@arnowelzel.de> - 2021-04-14 16:32 +0200
Re: problem figuring out why mail fails Jerry Stuckle <jstucklex@attglobal.net> - 2021-04-14 12:58 -0400
Re: problem figuring out why mail fails Kristall <kristallin555@gmail.com> - 2023-02-27 02:40 -0800
csiph-web