i have a mail form that will send mail if it is going to a name like
"someone@someplace.com"
but it will not work if the email address is
"cs@someplace.com"
Does mail() do some sort of validation before sending?
Also, its my understanding that valid email addresses must have at least 2 valid characters before the @ symbol.
T开发者_高级运维houghts?
Is somemplace.com the same domain as the SMTP server you are using to send mail? If so, then yes, it can do some verification to see if that mailbox actually exists before it will send the message.
But NO, there is no rule that you need 2 characters for a valid email address. One will do just fine.
a@b.com is a valid email address.
Read more in the RFC822 spec. Even if you don't think you can read 'grammars' you can follow the specs for what constitutes an address, and when you trace it down you'll see it can consist of one char on the left part of the address. (See section 6 and 3.3).
cs@someplace.com
is a valid email address, doesn't matter how few characters there are before the @ symbol, as long as there is at least 1 and it's an ASCII character defined in RFC 5322.
Assuming that you're using a valid email address which exists the problem is on your server.
mail() uses the SMTP server on your box, so perhaps check there for how it's configured.
Also, its my understanding that valid email addresses must have at least 2 valid characters before the @ symbol.
No,mail may has only one character a@mail.com
Please post all code
精彩评论