|
Posted by Dennis de Wit on 09/01/06 11:18
Mike wrote:
> Mike wrote:
>> Dennis de Wit wrote:
>>> Mike wrote:
>>>> Thanks Dennis,
>>>>
>>>> Basically the incoming and outgoing servers are called the same -
>>>> mail.mysite.co.uk.
>>>>
>>>> I already asked support and there response was...
>>>>
>>>> I've checked with our engineers, and I'm afraid that the server is
>>>> doing exactly what it's meant to be doing, and there isn't a way round
>>>> it. This is configured this way for security purposes to make it easy
>>>> to track down compromised scripts. Please be aware that the "On Behalf
>>>> Of" message will only show on some mail clients.
>>>>
>>>> Major pain!!
>>>>
>>>> Mike
>>>>
>>> I'd look for a different host; or accept the "on behalf of" message.
>>>
>>> Take a glass bottle, fill it with petrol, stick in an old newspaper, go
>>> to your webh...
>>>
>>> ... oh wait; you did not get that info from me.
>>>
>>> Dennis
>> Yes, I think your right, except I just paid £100 for it and to see "On
>> Behalf Of" looks un-professional!
>>
>> Thanks
>>
>> Mike
>
> Its fixed!!!
>
> The only code I need is as follows...
>
> <?php
> require("class.phpmailer.php");
> $mail = new PHPMailer();
> $mail->IsSMTP(); // send via SMTP
> $mail->From = "info@mysite.co.uk";
> $mail->FromName = "Info";
> $mail->AddAddress("mike@anothersite.co.uk","Mike");
> $mail->AddReplyTo("info@mysite.co.uk","Info");
> $mail->WordWrap = 50; // set word wrap
> $mail->IsHTML(true); // send as HTML
> $mail->Subject = "Here is the subject again";
> $mail->Body = "This is the <b>HTML body. Isn't it cool</b>";
> $mail->AltBody = "This is the text-only body. Istn't it cool";
> if(!$mail->Send())
> {
> echo "Message was not sent <p>";
> echo "Mailer Error: " . $mail->ErrorInfo;
> exit;
> }
> echo "Message has been sent";
> ?>
>
> If I take out $mail->IsSMTP(); it puts the "On Behalf Of" in the from
> address, if I leave it in it takes it out. I don't even need to
> specify a SMTP server, username or password.
>
> Thanks for all your help.
>
> Mike
>
I think that's because it uses the mail function if you don't add that
line. Now it uses your smtp server.
what did you change?
Dennis
Navigation:
[Reply to this message]
|