email phpmailer

13 replies · opened Mar 8, 2021

GGaryLouwMar 8, 2021

Hi,
I created a form but when the email gets sent, it goes the person that filled in the form and not to the email that is in the config file.
Can I also send an auto response to the person that filled in the form?

SSemicolon WebSTAFFMar 9, 2021

Hello,

Can you please provide us with Screenshot of the Configuration in your include/form.php File so that we can check and determine what is going wrong. Additionally, please consider checking the Documentation on Forms: http://docs.semicolonweb.com/docs/forms/form-setup/ for complete Setup details.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

GGaryLouwMar 9, 2021

<div class="row">
<div class="col-lg-6">
<form class="row" id="freelance-quote" action="include/form.php" method="post" enctype="multipart/form-data">
<div class="form-process">
<div class="css3-spinner">
<div class="css3-spinner-scaler"></div>
</div>
</div>
<div class="col-12 form-group">
<label>Name:</label>
<input type="text" name="freelance-quote-name" id="freelance-quote-name" class="form-control required" value="" placeholder="John">
</div>
<div class="col-12 form-group">
<label>Surname:</label>
<input type="text" name="freelance-quote-surname" id="freelance-quote-surname" class="form-control required" value="" placeholder="Doe">
</div>
<div class="col-12 form-group">
<label>Email:</label>
<input type="email" name="freelance-quote-email" id="freelance-quote-email" class="form-control required" value="" placeholder="user@company.com">
</div>
<div class="col-6 form-group">
<label>Phone:</label><br>
<input type="text" name="freelance-quote-phone" id="freelance-quote-phone" class="form-control required" value="" placeholder="081-234-5678">
</div>

						&lt;div class="col-6 form-group"&gt;
							&lt;label&gt;Subject:&lt;/label&gt;
							&lt;select class="form-control" name="freelance-quote-industry" id="freelance-quote-industry"&gt;
								&lt;option value=""&gt;-- Select One --&lt;/option&gt;
								&lt;option value="Talent Management"&gt;Talent Management&lt;/option&gt;
								&lt;option value="PR / Journalism"&gt;PR / Journalism&lt;/option&gt;
								&lt;option value="Sound Engineering / Music Producers"&gt;Sound Engineering / Music Producers&lt;/option&gt;
								&lt;option value="DJ"&gt;DJ&lt;/option&gt;
								&lt;option value="Acting"&gt;Acting&lt;/option&gt;
								&lt;option value="TV Presenters"&gt;TV Presenters&lt;/option&gt;
								&lt;option value="Radio Personalities"&gt;Radio Personalities&lt;/option&gt;
								&lt;option value="Cooperate MCing & Voice-over"&gt;Cooperate MCing & Voice-over&lt;/option&gt;
								&lt;option value="Commercial Model"&gt;Commercial Model&lt;/option&gt;
								&lt;option value="Life Coach"&gt;Life Coach&lt;/option&gt;
								&lt;option value="Vocal Training"&gt;Vocal Training&lt;/option&gt;
								&lt;option value="Music, Video / Photography Editing"&gt;Music, Video / Photography Editing&lt;/option&gt;
								&lt;option value="Personal and Social Media Branding"&gt;Personal and Social Media Branding&lt;/option&gt;
								&lt;option value="Live Band Instruments"&gt;Live Band Instruments ( Drum/Guitarist/Keyboard)&lt;/option&gt;
								&lt;option value="Dance / Choregrapher"&gt;Dance / Choregrapher&lt;/option&gt;
							&lt;/select&gt;
						&lt;/div&gt;
						&lt;div class="col-6 form-group"&gt;
							&lt;label&gt;Level:&lt;/label&gt;
							&lt;select class="form-control required" name="freelance-quote-project-type" id="freelance-quote-project-type"&gt;
								&lt;option value=""&gt;-- Select One --&lt;/option&gt;
								&lt;option value="Level 1"&gt;Level 1&lt;/option&gt;
								&lt;option value="Level 2"&gt;Level 2&lt;/option&gt;
								&lt;option value="Level 3"&gt;Level 3&lt;/option&gt;
							&lt;/select&gt;
						&lt;/div&gt;
						&lt;div class="w-100"&gt;&lt;/div&gt;
						&lt;div class="col-12 d-none"&gt;
							&lt;input type="text" id="freelance-quote-botcheck" name="freelance-quote-botcheck" value="" /&gt;
						&lt;/div&gt;
						&lt;div class="col-12"&gt;
							&lt;button type="submit" name="freelance-quote-submit" class="btn btn-secondary"&gt;Apply Now&lt;/button&gt;
						&lt;/div&gt;
						&lt;input type="hidden" name="prefix" value="freelance-quote-"&gt;
					&lt;/form&gt;

php code:
$toemails = array();
$toemails[] = array(
'email' => 'test@oliveentacademy.com', // Your Email Address
'name' => 'Olive Entertainment Academy' // Your Name
);
/-------------------------------------------------
Sender's Email
---------------------------------------------------
/
$fromemail = array(
'email' => 'test@oliveentacademy.com', // Company's Email Address (preferably currently used Domain Name)
'name' => 'Olive Entertainment Academy' // Company Name
);

$mail->IsSMTP();
$mail->Host = "mail.oliveentacademy.com";
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Port = 465;
$mail->Username = "test@oliveentacademy.com";
$mail->Password = "0l1v33nt@c@d3my";

SSemicolon WebSTAFFMar 10, 2021

Hello,

The Codes appear to be perfectly fine. We are not sure what is causing this issue. Can you please provide us with your FTP Details so that we can troubleshoot this issue ourselves and provide you with further assistance. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

GGaryLouwMar 10, 2021

FTP?
why do you need this?

GGaryLouwMar 10, 2021

How do I send autoresponders with a file attached?

SSemicolon WebSTAFFMar 11, 2021

Hello,

  1. We needed your FTP Details to check the Files and troubleshoot the issues. But it is completely fine if you are not comfortable to share it. However, we would not be able to check the issues more closely and provide you with a solution quickly.

  2. You will need to edit the include/form.php File. Find the following line of code:[ch_pre type="php"]$autoresponder = new PHPMailer();[/ch_pre]

and add the following line of code just after the above line:[ch_pre type="php"]$autoresponder->addAttachment( 'path-to-file' );[/ch_pre]

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

SSemicolon WebSTAFFMar 12, 2021

Hello,

Thank You so much for the FTP Access. We have tried checking your include/form.php File but we cannot find it on your Servers (see attached). Can you please provide us with the exact location where we can find this file in order to check and fix the issue? Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

GGaryLouwMar 12, 2021

sorry i fixed it now

GGaryLouwMar 12, 2021

please double check

GGaryLouwMar 13, 2021

Hi please help

GGaryLouwMar 13, 2021

$autoresponder = new PHPMailer();

	/* Add your Auto-Responder SMTP Codes after this Line */
	$autoresponder-&gt;isSMTP();
	$autoresponder-&gt;SMTPDebug = 0;
	$autoresponder-&gt;Host = 'smtp.gmail.com';
	$autoresponder-&gt;Port = 587;
	$autoresponder-&gt;SMTPSecure = 'tls';
	$autoresponder-&gt;SMTPAuth = true;
	$autoresponder-&gt;Username = "gwlcreativedesigns@gmail.com";
	$autoresponder-&gt;Password = "#men#765#";

<form class="row mb-0" id="landing-enquiry" action="include/form.php" method="post" enctype="multipart/form-data">
<div class="form-process"></div>
<div class="col-12 form-group mb-4">
<label>What is Your Name:</label>
<input type="text" name="landing-enquiry-name" id="landing-enquiry-name" class="form-control border-form-control required" value="">
</div>
<div class="col-12 form-group mb-4">
<label>Your Email Address Please:</label>
<input type="email" name="landing-enquiry-email" id="landing-enquiry-email" class="form-control border-form-control required" value="">
</div>
<div class="col-12 form-group mb-4">
<label>Tell more about your Project:</label>
<textarea name="landing-enquiry-additional-requirements" id="landing-enquiry-additional-requirements" class="form-control border-form-control" cols="10" rows="3"></textarea>
</div>
<div class="col-12 d-none">
<input type="text" id="landing-enquiry-botcheck" name="landing-enquiry-botcheck" value="" />
</div>
<div class="col-12">
<button type="submit" name="landing-enquiry-submit" class="button h-translatey-3 bg-dark rounded-pill"><i class="icon-line-arrow-right m-0"></i></button>
</div>
<input type="hidden" name="prefix" value="landing-enquiry-">
<input type="hidden" name="replyto" value="template-contactform-email">
<input type="hidden" name="autoresponder" value="true">
<input type="hidden" name="ar_subject" value="Auto-Responder Email Subject">
<input type="hidden" name="ar_title" value="Thank You for your Email">
<input type="hidden" name="ar_message" value="We have received your Message and will get back to you shortly. Meanwhile, check our Website: http://www.website.com .<br><br>Thank You">
<input type="hidden" name="ar_footer" value="Copyright Company Name">
</form>

I tried to get the autoresponder to work but didn't do anything

SSemicolon WebSTAFFMar 13, 2021

Hello,

Thanks for your Patience!

We have checked out your Forms and there were some Customization errors in your include/form.php which was causing the issues. We have added the relevant codes for the correct SMTP and Autoresponders both. You can check the include/form.php and index.php Files for the examples.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard