I am currently attempting to interact PHP with the ASPEmail COM server component, but I have run into a problem of the worst kind (no error messages everything appears fine but nothing happens e.g no email is sent).
What's really infuriating is it works on ASP...........
here's my PHP test code..
<?php
// prints e.g. 'Current PHP version: 4.1.1'
echo "<br />Current PHP version: " . phpversion();
echo "<br />Testing Mail";
$mail = new COM("Persits.MailSender") or die("Could not start Email COM Server");
echo "<br />Mail ContentTransferEncoding =" . $mail->ContentTransferEncoding;
echo "<br />Mail CharSet =" . $mail->CharSet;
echo "<br />Mail Host =" . $mail->Host;
echo "<br />Sending Test Mail";
$mail->Host = "127.0.0.1";
$mail->From = "test@localhost";
$mail->FromName = "Sysinfo";
$mail->AddAddress("info@localhost");
$mail->Subject = "Test Email";
$mail->Body = "Testing email";
$mail->Send;
?>
and the ASP code
<%
Response.Write("<br />Testing Mail")
Dim mail
set mail = Server.CreateObject("Persits.MailSender")
Response.Write("<br />Mail ContentTransferEncoding =" & mail.ContentTransferEncoding)
Response.Write("<br />Mail CharSet =" & mail.CharSet)
Response.Write("<br />Mail Host =" & mail.Host)
Response.Write("<br />Sending Test Mail")
mail.Host = "127.0.0.1"
mail.From = "test@localhost"
mail.FromName = "Sysinfo"
mail.AddAddress("info@localhost")
mail.Subject = "Test Email"
mail.Body = "Testing email"
mail.Send
%>
Please has anybody tried this before as I can't find any reference to it working or not working.
I have an alternate pure PHP solution already but can't use it at the moment.