Unable to send Mail.

Avatar
  • Answered
I am trying to send a Mail. If i type the email ID directly in the addaddress, it is fine. Where as if I mention a variable name which has email ID, I am getting an error ' you must provide at least one recipient email address .
My code is
$emailid='[email protected]'
$mail->addAddress($emailid, 'ABC');
Avatar
Arn
Hello, Sorry to hear that you're having problems with trying to send a mail. You have given us very little information concerning what you're doing, so we're going to assume that you're trying to setup some type of form that sends an email. In general, email contact forms have a recipient field where the email is targeted to be sent. You can see this in reviewing the instructions for how to setup FormMail. We also provide basic instructions on setting up a custom PHP contact form. The code snippet you're giving us may be from a third party, so you might want to review their documentation or support. If you want us to help you further, then please provide more details on the problem that you're having so that we may help you. Details include - name of form that you're using (if you're using a third-party form mail solution), domain name, and exact steps you're taking that lead to the problem. Kindest regards, Arnel C.