I am running php / mysql on an IIS server on Windows 2012 R2 server . I am using phpmailer to send out emails from the application that is build on that server . I am used to working on phpmailer though i don't have a thorough expertise on the IIS servers.
When i try to run the program , below is the error that i keep getting .
Could not instantiate mail function.
Below is my code :
$mail->SetFrom('ip address of the server'); //i am using the IP address as the server doesnt have a domain name or an email id
$mail->Subject = "TEXT";
$mail->AddAddress('Email address', ""); //changed in this case
$body = "TEXT 5";
$mail->MsgHTML($body);
$mail->AddAttachment("app1.pdf");
if($mail->Send())
{
echo "sent";
}
else{
echo $mail->ErrorInfo;
}
If i run it on any other server with a genuine email id of that server ,it works fine . The issue with this server (Windows r2 2012) is that it does not have a domain name or an email id , just the IP address .
Would be great if someone could advice how to go about handling this issue .
Thanks in advance.