Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 160 characters in body
Source Link
$mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->Host = "smtp.gmail.com"com";
            $mail->Username = "[email protected]";
            $mail->Password = "password";
            $mail->SMTPSecure = "tls";
            $mail->Port = 587;
            $mail->From = >SetFrom("mariammuhammad99@gmail.com";com");
            $mail->addAddress = >AddAddress($cash[0]["email"]$cash[0]['email']);
            $mail->isHTML(true);
            $mail->Subject = "CS50 Apparels: You just bought an item!";
            $mail->Body = "<i>You"You just bought bought".$row['suit_name'] for ."for".$row['price'] dollars."dollars!</i>";";
            $mail->AltBody = "You just bought bought".$row['suit_name'] for ."for".$row['price'] dollars."dollars!";
            if ($mail->Send() == false) 
            {
                die($mail->ErrInfo>ErrorInfo); 
            }

I'm trying to use php mailer for sending emails inI fixed my final projectprevious issues, but now I'm getting an error about an unexpected t_variable: "The following From address failed: mariammuhammad99@gmail. I pretty much copied most ofcom The following From address failed: [email protected] SMTP server error: 5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/answer/14257 79sm22609146pfs.42 - gsmtp" I tried checking out the code from online since I didn't know howlink, but it's not the answer to use phpmailermy question. What's wrong here?

$mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->Host = "smtp.gmail.com"
            $mail->Username = "[email protected]";
            $mail->Password = "password";
            $mail->SMTPSecure = "tls";
            $mail->Port = 587;
            $mail->From = "mariammuhammad99@gmail.com";
            $mail->addAddress = ($cash[0]["email"]);
            $mail->isHTML(true);
            $mail->Subject = "CS50 Apparels: You just bought an item!";
            $mail->Body = "<i>You just bought $row['suit_name'] for $row['price'] dollars!</i>";
            $mail->AltBody = "You just bought $row['suit_name'] for $row['price'] dollars!";
            if ($mail->Send() == false) 
            {
                die($mail->ErrInfo); 
            }

I'm trying to use php mailer for sending emails in my final project, but I'm getting an error about an unexpected t_variable. I pretty much copied most of the code from online since I didn't know how to use phpmailer. What's wrong here?

$mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->Host = "smtp.gmail.com";
            $mail->Username = "[email protected]";
            $mail->Password = "password";
            $mail->SMTPSecure = "tls";
            $mail->Port = 587;
            $mail->SetFrom("mariammuhammad99@gmail.com");
            $mail->AddAddress($cash[0]['email']);
            $mail->isHTML(true);
            $mail->Subject = "CS50 Apparels: You just bought an item!";
            $mail->Body = "You just bought".$row['suit_name']."for".$row['price']."dollars!";
            $mail->AltBody = "You just bought".$row['suit_name']."for".$row['price']."dollars!";
            if ($mail->Send() == false) 
            {
                die($mail->ErrorInfo); 
            }

I fixed my previous issues, but now I'm getting an error: "The following From address failed: mariammuhammad99@gmail.com The following From address failed: [email protected] SMTP server error: 5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/answer/14257 79sm22609146pfs.42 - gsmtp" I tried checking out the link, but it's not the answer to my question.

Source Link

phpmailer bug final project

$mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->Host = "smtp.gmail.com"
            $mail->Username = "[email protected]";
            $mail->Password = "password";
            $mail->SMTPSecure = "tls";
            $mail->Port = 587;
            $mail->From = "[email protected]";
            $mail->addAddress = ($cash[0]["email"]);
            $mail->isHTML(true);
            $mail->Subject = "CS50 Apparels: You just bought an item!";
            $mail->Body = "<i>You just bought $row['suit_name'] for $row['price'] dollars!</i>";
            $mail->AltBody = "You just bought $row['suit_name'] for $row['price'] dollars!";
            if ($mail->Send() == false) 
            {
                die($mail->ErrInfo); 
            }

I'm trying to use php mailer for sending emails in my final project, but I'm getting an error about an unexpected t_variable. I pretty much copied most of the code from online since I didn't know how to use phpmailer. What's wrong here?