TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   PHPMailer don't work for me -.-.. (http://www.talkphp.com/general/2297-phpmailer-dont-work-me.html)

Nor 02-20-2008 05:57 PM

PHPMailer don't work for me -.-..
 
Right I used there basic example:

Code:

<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "mail.iwatch-this.info"; // SMTP server
$mail->From = "iwatchth@iwatch-this.info";
$mail->AddAddress("scheols@gmail.com");

$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;

if(!$mail->Send())
{
  echo 'Message was not sent.';
  echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
  echo 'Message has been sent.';
}

I keep getting the message was not sent error.

DeMo 02-20-2008 07:03 PM

PHP Code:

$mail->Host "mail.iwatch-this.info"// SMTP server 

Is this also part of the example?
If it is, I guess it's not a valid SMTP server, it's there just to show how you use the class. You have to change that line and put your own (your host's) SMTP address there.

By the way, you don't need a separate class for sending mail, you can use the mail() function to do this. It's already setup and you don't need to waste time searching for SMTP server addresses and stuff like that.

Nor 02-20-2008 07:37 PM

Right...I want to use a SMTP email server for the fact mail is acting gay and sending to the spam box again.

Gareth 02-20-2008 07:53 PM

Are you trying this on localhost?

Nor 02-20-2008 10:14 PM

No I have share hosting.

DeMo 02-21-2008 03:50 AM

You have to use your own SMTP server then.
Ask your host for the address, check to see if it is somewhere on your control panel, or just try smtp.yourdomain.com, mail.yourdomain.com...

Nor 02-21-2008 01:09 PM

I did as in the first post...O_O..

Anilkumar 02-10-2009 05:57 AM

How can i solve this problem :

From: MAILER-DAEMON@stretton.positive-dedicated.net
> [mailto:MAILER-DAEMON@stretton.positive-dedicated.net]
> Sent: 09 February 2009 14:15
> To: info@mufti.co.uk
> Subject: failure notice
>
> Hi. This is the qmail-send program at stretton.positive-dedicated.net.
> I'm afraid I wasn't able to deliver your message to the following
addresses.
> This is a permanent error; I've given up. Sorry it didn't work
out.
>
> <anna@mufti.co.uk,oliver@camlab.com,info@mufti.co. uk>:
> 212.188.174.240 does not like recipient.
> Remote host said: 550 Requested action not taken: mailbox unavailable or
not
> local
> Giving up on 212.188.174.240.
>
> --- Below this line is a copy of the message.
>
> Return-Path: <info@mufti.co.uk>
> Received: (qmail 16367 invoked by uid 33); 9 Feb 2009 14:14:35
-0000
> To: sarahezaz@hotmail.com
> Subject: Mufti: New Order Details
> Date: Mon, 9 Feb 2009 14:14:35 +0000
> From: Mufti <info@mufti.co.uk>
> Reply-to: Mufti <info@manandvan.biz>
> Message-ID: <788ccd955c573a71556dd438e9a00830@shop.mufti.co.uk >
> X-Priority: 3
> X-Mailer: PHPMailer [version 1.73]
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> Content-Type: text/html; charset="iso-8859-1"


Thanks In Advance
--------------------

Anil Kumar ::-@:-@:-@:-@:-@:-@


All times are GMT. The time now is 02:12 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0