troubleshooting Question

PHP send mail issue

Avatar of doctorbill
doctorbillFlag for United Kingdom of Great Britain and Northern Ireland asked on
PHPWindows OSApache Web Server* Sendmail
8 Comments1 Solution18 ViewsLast Modified:

I am having big problems sending mail from my windows apache  app
The settings below are the settings in the various config files and used to work in my previous xampp setup in windows
I am using an older version of xampp to run a website with old code just to give me time to update the code for a new install
The site is on the same xampp version and php version which it used to run on and worked perfectly
When I now send data (using the "PHP file used to send data") from a webpage with the below configurations, I get the message that the email was sent successfully but nothing comes through
Any ideas?

PHP.ini file:
[mail function]

smtp_port = 2525

sendmail_from =

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"





PHP file used to send data:

<?php require_once('../Connections/TickTockDB.php'); ?>

$breakecho = "<br />";
$poundsent = "£";
echo $_GET['invPath'];
echo $breakecho.$_GET['emailAddress'];
echo $breakecho.$poundsent.$_GET['invTotal'];
echo $breakecho.$_GET['comment'];
echo $breakecho.$_GET['invDetails'];
echo $breakecho.$_GET['invPaypal'];

//$path = '2205-Invoice-British Friends of BAR-ILAN University-No.265-1453153496.pdf';
//$path = '../ticktockInt/documents/Invoices/PaidInvoice-Perfect Travel Ltd-No.284-1482266230.pdf';
$location = "../";
$break = "<br />";
$pound = "£";
$space = "&nbsp;";
$path = $_GET['invPath'];
$url = '';
$mailaddress = $_GET['emailAddress'];
$invdetails = $_GET['invDetails'];
$invoicetotal = $_GET['invTotal'];
$paypal = $_GET['invPaypal'];
$comment = $_GET['comment'];
$paypalme = '';
$name= 'test.pdf';
$encoding = 'base64';
$type = 'application/pdf';
$mail = new PHPMailer;
//$mail->CharSet = 'UTF-8';
//$mail->Encoding = 'base64';
$mail->setFrom('', 'TickTockIT');
$mail->addAddress($mailaddress, 'My Contact');
//$mail->addAddress('', 'My Contact');
//$mail->addStringAttachment(file_get_contents($path), 'invoice.pdf');
//$mail->addAttachment($path, $name, $encoding, $type);
//$mail->addStringAttachment($path, $name, $encoding, $type);
$mail->AddEmbeddedImage('images/payment.gif', 'PaypalImage');
$mail->AddEmbeddedImage('images/pplogo.png', 'pplogo');
$mail->AddEmbeddedImage('images/ticktockHeader_logo_whiteBkgnd_support.jpg', 'ttheader');
$mail->Subject  = 'Invoice from TickTockIT';
$mail->Body = $Body;
$mail->Body = 'Attached Invoice for the following IT work:
'.$break.'Invoice Amount:'.$space.$pound.''.$invoicetotal.'
'.$break.$break.'Paypal Link:'.$space.$paypal.'
'.$break.$break.'<img src="cid:ttheader" />
'.$break.'<a href='.$paypal.' style="text-decoration:none"><p style="font-size:30px; color: #808080">Click Here to go to payment web page<img src="cid:PaypalImage" /></p></a>
'.$space.'(Guest Account Required)
'.$break.'<a href='.$paypalme.' style="text-decoration:none"><p style="font-size:30px; color: #808080">Click Here for Instant Payment<img src="cid:pplogo" /></p></a>';
if(!$mail->send()) {
  echo $break.'Message was not sent.';
  echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
  echo $break.'Message has been sent.';


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 8 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 8 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004