Mailer not working on live site

1 reply · opened Mar 21, 2021

GGaryLouwMar 21, 2021

Good day,
I am having trouble with the mailer. on my localhost it works perfect i can send mails. but once i uploaded it to the live site, it keeps coming back as SMTP connect failed() please help.

$toemails = array();

$toemails[] = array(
'email' => 'info@oliveentacademy.com', // Your Email Address
'name' => 'Olive Entacademy' // Your Name
);

/-------------------------------------------------
Sender's Email
---------------------------------------------------
/

$fromemail = array(
'email' => 'no-reply@oliveentacademy.com', // Company's Email Address (preferably currently used Domain Name)
'name' => 'Olive Entacademy' // Company Name
);

/-------------------------------------------------
reCaptcha
---------------------------------------------------
/

// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = ''; // Your reCaptcha Secret

/-------------------------------------------------
PHPMailer Initialization
---------------------------------------------------
/

$mail = new PHPMailer();

/* Add your SMTP Codes after this Line */
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Host = 'smtp.gmail.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "OliveEntAcademy@gmail.com";
$mail->Password = "Julio@29";

<div class="form-widget">
<div class="form-result"></div>
<form class="mb-0" id="template-contactform" name="template-contactform" action="include/form.php" method="post">
<div class="form-process">
<div class="css3-spinner">
<div class="css3-spinner-scaler"></div>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group">
<label for="template-contactform-name">Name <small></small></label>
<input type="text" id="template-contactform-name" name="template-contactform-name" value="" class="sm-form-control required" />
</div>
<div class="col-md-4 form-group">
<label for="template-contactform-email">Email <small>
</small></label>
<input type="email" id="template-contactform-email" name="template-contactform-email" value="" class="required email sm-form-control" />
|</div>
<div class="col-md-4 form-group">
<label for="template-contactform-phone">Phone</label>
<input type="text" id="template-contactform-phone" name="template-contactform-phone" value="" class="sm-form-control" />
</div>
<div class="w-100"></div>
<div class="col-md-8 form-group">
<label for="template-contactform-subject">Subject <small></small></label>
<input type="text" id="template-contactform-subject" name="subject" value="" class="required sm-form-control" />
</div>
<div class="w-100"></div>
<div class="col-12 form-group">
<label for="template-contactform-message">Message <small>
</small></label>
<textarea class="required sm-form-control" id="template-contactform-message" name="template-contactform-message" rows="6" cols="30"></textarea>
</div>
<div class="col-12 form-group d-none">
<input type="text" id="template-contactform-botcheck" name="template-contactform-botcheck" value="" class="sm-form-control" />
</div>
<div class="col-12 form-group">
<button class="button button-3d m-0" type="submit" id="template-contactform-submit" name="template-contactform-submit" value="submit">Send Message</button>
</div>
</div>
<input type="hidden" name="prefix" value="template-contactform-">
</form>
</div>

SSemicolon WebSTAFFMar 21, 2021

Hello,

This issue appears to be with your Server Configurations. Your Web Hosting Provider seems to be blocking outgoing SMTP Connections or the Ports used for SMTP Connections. You will need to directly contact your Web Hosting Provider regarding this issue as the SMTP Codes are working perfectly fine on your Localhosts.

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