PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a set of codes to manage a simple mail list,
everything's fine, except for this piece to send an email to each address,
I can't figure out why this is not working,
it doesn't give an error, but the no emails are sent
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Use trim() to remove the end-of-line sequence from each address. Also check the return value of mail() so you know whether the server says it sent or not.
lisawebs wrote:when using explode,
the echo() shows Array, not the content,
either with "" or without
when using $addresses = File(...
the echo shows the content
explode() returns an array so you have to loop over its elements like you were doing with file().
lisawebs wrote:how could I test the mail() to know if the server
sent the msg?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Main solution was using the trim()
The only problem with this code is
the @hotmail.com addresses are not receiving emails
(not even as junk)
Yahoo and other mails are receiving normaly
So I'll open a new issue about how to control the
mail() info/headers to allow messages be accepted.
Thanks to everyone!!!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]