Questions tagged [phpmailer]
PHPMailer is a PHP email transport class. PHPMailer is designed to communicate directly with other servers (unlike PHP's native mail() function). Use with the [php] tag
4,879
questions
0
votes
0answers
11 views
How to send php mail attachment with original filename
I send email with attachment, everything is working, but I get email with attachment temporary name. What is wrong with this code ?
foreach ($_FILES["file"]["name"] as $k => $v) ...
0
votes
0answers
13 views
Using foreach loop for React state inside of mailer php
The result I get> Hello guys. Hope you are doing well. I am challenging to find out how to use foreach loop for react state inside of mailer.php file
This is my php file (I skipped all the lines ...
0
votes
0answers
16 views
Getting issue in AWS smtp email setting with php [closed]
Mailer Error: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region EU-...
0
votes
2answers
19 views
PHP Mail() Function on Cpanel Hosts Going to SPAM [duplicate]
Email sent from the PHP mail() function hosted on a Cpanel account frequently ends up in SPAM (all the time for @outlook.com, some of the time for @gmail.com)
I've determined it is NOT due to the ...
1
vote
1answer
25 views
clear last exception error from PHPMailer for next loop
lets say i have this:
$emails = array('some1@email.com', 'some2@email', 'some3@email.com', 'some4@email.com');
foreach ($emails as $email) {
try {
$mail->addAddress($email);
$...
0
votes
1answer
34 views
phpmailer working on localhost but when i upload it on my ubuntu server it gives me error and mail is not sending(I am using gmail smtp)
<?php
if(isset($_POST['sendmail'])) {
require 'PHPMailerAutoload.php';
require 'credential.php';
$mail = new PHPMailer;
$mail->SMTPDebug = 4; ...
0
votes
2answers
24 views
Send email from GoDaddy Server using PHP or PHPMailer
I want to enable my website users to send an email.
I use PHP and my host is GoDaddy. I assume that PHPMailer is the best option.
I think my problem is trying to connect to GoDaddy's PHPMailer.
...
0
votes
2answers
23 views
PHPMailer sends email with SMTP authentication but Gmail still claims it cannot validate sender
I am using PHPMailer to send SMTP authenticated emails from my PHP scripts. The PHPMailer script works, it throws no errors and I receive my test emails, however they are still flagged as not ...
-1
votes
0answers
19 views
Reducing Chance of PHP Mail going to Gmail Spam? [duplicate]
I have a case management application that in many circumstances it the PHP script needs to send an email to a contact in the case. Probably about 25% of the time the email goes to Gmail spam.
Using ...
0
votes
1answer
15 views
PHPMailer prevent emails from being “chained together”
I have a simple PHP endpoint that takes a POST request and uses PHPMailer to send me an email. The whole thing works fine but I notice that in my email client (Gmail on web), the emails I receive from ...
0
votes
1answer
13 views
SMTP emails from PHPMailer not working now migrated to AWS
I have a large piece of software that was previously hosted on Godaddy, i used the below code to send appointment confirmations to customers :
if ($systemToken == $token) {
if ($...
0
votes
1answer
32 views
How to get PHP variable from another file?
I'm trying to make a forgot password system with PHPMailer on xampp.
But when I send an email,the email body is a html mail template,what I get from another file $mail->Body = file_get_contents('...
-3
votes
1answer
19 views
Can I use PHPMailer for receiving emails on my domain name
Can you use PHPMailer to receive emails from your domain name ? My free hosting don't allow emails so you have to use an alternative. I have use PHPMailer to send email and it works fine. But now I ...
-2
votes
0answers
15 views
PHP mail() function? [duplicate]
I know there are a TON of other questions on this topic, but I've tried all their solutions, and it didn't help, so I'm going to need an explanation on what I'm doing wrong. I have a raspberry pi (not ...
0
votes
0answers
35 views
Why is $mail->send() in phpMailer called twice in a row?
I have problem while sending mail, my user gets 2 identical mails, I tried to find a solution but no one. Please help me!
class SendMail
{
private $mail;
private $subject;
private $body;
...
0
votes
1answer
37 views
fatal error: Uncaught Error: Class 'PHPMailer\PHPMailer\SMTP' not found in D:\projects\cscpl\PHPMailer.php
I have install PHPMailer manually without composer and added five files in cscpl folder. I'm sending mail from gmail. But I'm getting following error.
Fatal error: Uncaught Error: Class 'PHPMailer\...
-1
votes
0answers
17 views
Sending An Embedded logo in php with PHP Mailer
here is code
public function send($data)
{
$this->mail->addAddress($data['to'], $data['name']);
$this->mail->Subject = $data['subject'];
$this->mail->addEmbeddedImage('/...
0
votes
1answer
28 views
PHPMailer not sending any email
I am using PHPMailer library to send email but it is not sending any email,I tried since morning but still I am unable to send any email it is showing error this page is not working
phpmailer.php,smtp ...
1
vote
1answer
35 views
How to use PHPMailer (localhost+gmail) in a custom MVC framework
I'm trying to send emails using the PHPMailer library and gmail in my MVC project. Here's what I did in my project. My project and files:
myproject
-app
-controllers
...
0
votes
0answers
15 views
Php mailer Email message Blocked
i am using php mailer to send emails for my website the code is working very fine mails are sent properly but as soon as i try to include the verification link of my website the email message gets ...
0
votes
1answer
29 views
Error sending mail in PHPMailer possible error in time zone
I am trying to send emails with PHPMailer but I have errors
I think the error is because PHPMailer has a different timezone set than php.
Does anyone know how to change the time zone of PHPMailer or ...
0
votes
1answer
16 views
Usiing .env with phpmailer giving error: creating default object from empty value
I need to grab client credentials from an .env file. I've checked that the credentials are correct.
If I type strings directly like this
$mail->Password = "";
I can send to my email.
...
0
votes
0answers
21 views
PHPMailer don't works well [duplicate]
i know that there is a lot of question like that on google but i just can't find an other forum for my case. When I remove $mail->isSMTP(); PHPMailer return me this error :
Could not instantiate ...
0
votes
2answers
47 views
How to hide email account password in PHP code running in HTML file?
I edited the .htaccess file on my website and enabled PHP code to run in HTML files.
It was all working just fine, but somehow the .htaccess file got changed back on the server, and HTML was removed ...
-1
votes
1answer
26 views
How can I avoid “Enabling Less Secure Apps Access” in Gmail?
I am trying to use Gmail outbound email settings so that I can send emails. My site has an active SSL and working HTTPS and also have the commonly required security extensions installed and enabled. I ...
0
votes
1answer
15 views
phpmailer, client not responding to server
When trying to send an email through the phpmailer nothing happens. After looking at the log it seems that when the server asks for XOAUTH2 the client simply doesn't respond... Usually the client ...
0
votes
1answer
26 views
How to send an Email to User depending on the value of the wordpress-method get_post_meta()?
I implemented a function in my Wordpress admin panel, which is a checkbox. I like to send a email to that specific user, when I check the box or uncheck the box on his specific post and hit the save-...
0
votes
1answer
36 views
Does PHPMailer with oauth2-google use get_oauth_token
We’ve implemented PHPMailer with oauth2-google (via GitHub): no problem.
But I am trying to understand the logic behind the use of the get_oauth_token grant code.
When run standalone, it simply ‘loops’...
0
votes
1answer
22 views
Hostgator send mail [duplicate]
I am using the following code to send email from my website:
<?php
$to = "mygmail@gmail.com;
$subject = "My Site - NoReply";
$headers = "From: do not reply @ My Site" . &...
0
votes
2answers
24 views
smpt error when using $_ENV for credentials in phpmailer
When using hard-coded username / email / password I have no problem getting a message sent with phpmailer. But when I use $_ENV to hide the credentials I get the smtp error as shown here:
2020-09-...
0
votes
0answers
17 views
Problems with sending emails and the promotions box
Good afternoon, I am creating a system and I need to send some emails, for that I use PHPMailer, but recently google has disabled LSA, and I can no longer send emails without being on localhost, I ...
0
votes
0answers
17 views
Sending an email with SMTP in php using PHPMailer [duplicate]
$mail = new PHPMailer(true);
try {
$mail->SMTPDebug = 2;
$mail->isSMTP();
$mail-...
0
votes
0answers
22 views
PHP Mail going to Junk folder [duplicate]
I am trying to create a portfolio website for a college class and want to sent up a contact page where people can sent me messages rather than just posting my personal email to the world. the problem ...
-1
votes
0answers
9 views
This Php Code Is Not Working For Me To Receive Mail From My Web [duplicate]
Unable To Receive Mail Using This Code
<?php
$recipient = "";
$recaptcha_secret_key = 'yourAPIkey';
if(!empty($recaptcha_secret_key) && array_key_exists('...
0
votes
1answer
36 views
How to use msmtp with DKIM to send as other organisation
I have a off the shelf PHP app it uses msmtp to do its mail sending. My some of my users are part of another external_organisation, and they need to send email from my php app as their ...
0
votes
0answers
26 views
PHPMailer stops the script after send();
I'm trying to implement PHPMailer in a form. Everything works well, doing tls to O365 etc. But I seem to get a fatal error in the send(); because the script stops and hangs there. The mail is sent and ...
0
votes
0answers
37 views
PHP strange behaviour on IF statement when sending email via phpmailer (having output of IF and ELSE together)
The script im going to present is quite dificult to understand, but I will explain the basic idea bellow.
<?php
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\...
0
votes
0answers
57 views
PHP Mailer: get_oauth_token.php returning empty refresh token on server but works fine on localhost
I need to send emails from contact forms using Gmail SMTP through a GSuite account. I tested everything on local machine and everything worked. But after deployment I can't generate the refresh token ...
0
votes
1answer
41 views
Error - 200: parsererror on send of mail using phpmailer
I've just started using phpmailer to send mail instead of the basic mail function.
I've added the phpmailer function to an ajax script to send a mail on a certain event. The script works perfectly ...
1
vote
1answer
41 views
PHPMailer works with request from localhost but not from outside my machine
There are many posts trying to figure it out that PHPmailer works in localhost but not in server, but my problem is way weirder!
I have a script working fine on my local machine (XAMP on osx). I'm ...
0
votes
1answer
10 views
How To Have Different ReplyTo Addresses for Different Email Addresses Using PHPMailer?
Just curious if its possible using phpmailer to send an email to 2 different recipients and each recipient would have a different reply to address. Right now I am sending a bcc to myself but in order ...
0
votes
0answers
21 views
Sending webforms: envelope sender not allowed
I have a website with a webform which users can use to contact a company. The webform internally creates an email in PHP using PHPMailer and is sending this email via SMTP to the company.
The company ...
-1
votes
1answer
33 views
How to send fillable pdf (filled with pdftk) via PHPMailer?
I have a form on a website that customers fill. When user filles the form and clicks submit data is sent to a pdf(invoice) I've already created and certain spots in pdf are filled with that data. I ...
0
votes
1answer
33 views
PHP & PHPMailer : Can not send an attached file when fopen is disabled
I have used PHPMailer for 10 years with no problems.
But, now my server need to disable "fopen" in PHP which is affected "file_get_contents" in PHPMailer.
I try CURL instead of &...
0
votes
0answers
19 views
error in integration of phpmailer in codeigniter3
this is my error
Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
this is my code
defined('BASEPATH') OR exit('No direct ...
0
votes
2answers
221 views
PHP mailer not Working with wordpress 5.5
I have a website on wordpress 5.4 and recently it was updated to version 5.5 and now i am unable to send emails using PHPMailer. The Error i get is "There has been a critical error on your ...
0
votes
0answers
36 views
Redirection after successful insertion & mailing using foreach loop in PHP
Code explanation:
The given provided code is about ordering the items in a ecommerce website and trigger the php mailer to send cart items on a specific email address via email and it also insert the ...
0
votes
2answers
50 views
Why do I get a sender rejected from postfix when sending from phpmailer?
When I run the following PHP code I get an error.
$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = SMTP::DEBUG_SERVER; // debug
$mail->Host = 'localhost';
$mail->Port = 25;
$mail-...
-1
votes
0answers
37 views
PHPMailer Password Command Failed
I have an email server that works perfectly fine when sending from SSL, and when sending from Gmail, Mail.com, and my own personal domain (provided by IONOS).
I began having issues when trying to send ...
0
votes
0answers
71 views
PHPMailer works in browser but not working as cron job
I have a simple php file that sends an email using PHPMailer. It works great when run from the browser.
When I try to run it from a cron job I don't get the email. I have looked for quite a while ...