Jump to content

Custom Web-form to whmcs ticket


webpoint

Recommended Posts

Hi all,

 

We have a custom web-form on our site for requests.

Customer fill out some needs, and then i send them a quote. They fill in out name, mail, and needs. Then they submit it, and i get mail to my personal mail.

My question is, how can i accomplish, that this form sends mails to the support@ mail that i setup on whmcs, so that if customer fills that form out, and after hi submit the form, the form opens a ticket in whmcs, and the user get an mail that a ticket is opened?

 

I tried to change the mail in the form, so that it sends mails to support@mydomain, and this mail is set to import mails to tickets - /pipe/pipe.php, but it does not work.

 

Will be nice to see some suggestions:)

 

Cheers!

Link to comment
Share on other sites

That would work if the form also sends the submitters email address as the "from" address.

 

What do you see in the whmcs ticket import log for the submission? Is it possible you have email disabled for non registered users? Is your spam filtering catching the form submission? Are you submitting the form using an email address that is also an admin in whmcs? (That will not work)

 

You need to post a little more detail about what your seeing.

Link to comment
Share on other sites

That would work if the form also sends the submitters email address as the "from" address.

 

What do you see in the whmcs ticket import log for the submission? Is it possible you have email disabled for non registered users? Is your spam filtering catching the form submission? Are you submitting the form using an email address that is also an admin in whmcs? (That will not work)

 

You need to post a little more detail about what your seeing.

 

I`ts strange, because the department Sales, has mail sales@..., and for this department "Clients Only" i UNCHECKED.

When i send mail from a differend mail to sales@..., i get back mail (Your email to our support system could not be accepted because it was not recognized as coming from an email address belonging to one of our customers. )

But the option "Clients Only Only allow registered clients to open tickets in this department" is not checked?

In this situation (NOT checked), a ticket should be opened? Right?

 

- - - Updated - - -

 

In the pipe mail log the we can see: "Unregistered Email Address"

Link to comment
Share on other sites

issue is with my mailing script so fare i see:

<?php 
$errors = '';
$myemail = 'sales@xxxx.com';//<-----Put Your email address here.
$fromemail = 'ttt@xxxx.com';//<-----Put Your email address here.
if(!isset($_POST['firstname'])  ||
  !isset($_POST['lastname'])  || 
  !isset($_POST['email']) || 
  !isset($_POST['email2']))
{
   $errors .= "\n Error: all fields are required";
}
$countryserv = htmlspecialchars($_POST['countryserv']);
$firstname = htmlspecialchars($_POST['firstname']); 
$lastname = htmlspecialchars($_POST['lastname']);
$email_address = htmlspecialchars($_POST['email']); 
$storage = htmlspecialchars($_POST['storage']); 
$bandwidth = htmlspecialchars($_POST['bandwidth']);
$os = htmlspecialchars($_POST['os']);
$cpu = htmlspecialchars($_POST['cpu']);
$mcpu = htmlspecialchars($_POST['mcpu']);
$ram = htmlspecialchars($_POST['ram']);
$purpose = htmlspecialchars($_POST['purpose']);
$email2 = htmlspecialchars($_POST['email2']);



if (!preg_match(
"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", 
$email_address))
{
   $errors .= "\n Error: Invalid email address";
}

if( empty($errors))
{
$to = $myemail; 
$email_subject = "Server Request: $countryserv";
$email_body = "You have received a new message. ".
" Server Request Details:\n SRV Country: $countryserv \n Name: $firstname $lastname \n Email: $email_address \n Storage: $storage \n Bandwidth $bandwidth \n OS: $os \n CPU: $cpu \n CPU Type: $mcpu  \n RAM: $ram \n Purpose: $purpose \n Message: \n $more"; 

$headers = "From: $myemail\n"; 
$headers .= "Reply-To: $fromemail";

mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: thank_you.php');
} 
?>

 

I set here the mail sales @ xxxx.com, because the submitted info shoult go to that mail. But the mail import log tells me => "Blocked Potential Email Loop". How to fix this circle?

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