Papa De Beau
Papa De Beau

Reputation: 3828

Use PHPmailer or regualer PHP mail to send text: From $Phone-Number

Can I send a text message using PHP or PHPmailer and in the return use a phone number and not an email?

PHP mail() and PHPmailer makes me use a valid email with an "@" symbol. Is there a way around this?

Upvotes: 0

Views: 811

Answers (1)

Brad
Brad

Reputation: 163282

You can put whatever you want in the from field, but don't expect your mail server, or the receiving mail server to accept it.

Better to set your from: field to something like this instead:

"123-123-1234 <[email protected]>"

That way, you can have a valid from address, and still display a number to the end user.

Upvotes: 1

Related Questions