Jump to content

Issue in contact form (sender email is lost)


Recommended Posts

Hello.

I've just realized an issue in contact form, which brings to the loosing of email address of the user trying to contact

If the user compile the form, his own address is lost: the ticket opened by WHMCS processing this email report only the system sending address (noreply@ )

I.e.: John (john@example2.net) compile a form:  looking at the email message created by the form, I can find:

To: info@mydomain.com
From: Noreply <noreply@example.com>
Reply-To: John <noreply@example.com>, John <john@example2.net>

   But grabbing the email to import it as a ticket in WHMCS, the system loose the second address of John , and keep only the first one (noreply@example.com): so, basically, the email address information of the user is lost.

 

In the support ticket mail import log I find:

 

14/05/2020 18:25	info@mydomain.com	Contact Form: info test
From: John «noreply@example.com»	Ticket Imported Successfully

I don't know exactly when this issue rised: few months ago it worked properly...

 

Edited by Remitur
Link to comment
Share on other sites

19 hours ago, Remitur said:

I don't know exactly when this issue rised: few months ago it worked properly...

you're piping the contact form results email into WHMCS to create a ticket ? wouldn't it be easier to cut out the middle man and just use a separate support department for users to either open a ticket on the site, or via email piping... and not the contact form ??

Link to comment
Share on other sites

6 hours ago, brian! said:

you're piping the contact form results email into WHMCS to create a ticket ? wouldn't it be easier to cut out the middle man and just use a separate support department for users to either open a ticket on the site, or via email piping... and not the contact form ??

I liked to use the "contact" form of WHMCS, AND manage any received contact as ticket... and it was working fine (I still need to understand what WHMCS update broke the magic...)

Would not use a separate department just for this kind of contact, because we would not create another email address (which is necessary to manage a department).

But I understood what should be the code issue (even if without having access to contact.php code...)

This behaviour is normal for phpmailer: if you specify just 

 $mail->addReplyTo($email);

phpmailer will ADD  the  $email address to the sender email ad "reply to", if you want $email to be the only "reply to" address, then you need to use also the ClearReplyTos() method.

So right code should be something like:

$mail->ClearReplyTos();
$mail->addReplyTo($email);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated