FreeHostia Forums
http://forum.freehostia.com/

sendmail will not work again!
http://forum.freehostia.com/viewtopic.php?f=5&t=9273
Page 1 of 1

Author:  timcra7 [ Sat Sep 13, 2008 10:16 pm ]
Post subject:  sendmail will not work again!

and I have submitted a suport ticket,does anyone else have this problem going on? also I have the value plan not the free plan.[/b]

Author:  KJ [ Sun Sep 14, 2008 2:10 am ]
Post subject: 

Currently there are no issues sending e-mails via php script. I uploaded an example script in your FTP space and it is working properly. You can see it here:
http://tnt-entertainment.biz/sendmail.php

Author:  timcra7 [ Sun Sep 14, 2008 3:30 pm ]
Post subject: 

thanks for fixing it :)

Author:  KJ [ Sun Sep 14, 2008 11:59 pm ]
Post subject: 

You are welcome!

Author:  Sir Rogers [ Sat Oct 04, 2008 4:04 pm ]
Post subject: 

Hello, could you please help me out on this?

I can't get my code to send an email. I've tried everything. The mail() command, an external phpmailer class, nothing seems to work ...

I've been looking for 4 hours for this now, and I can't get a simple mail command to work, I really need some help. A working source code would be awesome. This is what I have, and it's not working:

Code:
<?php

//error_reporting(E_ALL);
error_reporting(E_STRICT);

date_default_timezone_set('America/Toronto');

include("class.phpmailer.php");
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded

$mail             = new PHPMailer();

$body             = $mail->getFile('contents.html');
$body             = eregi_replace("[\]",'',$body);

$mail->IsSMTP();
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;                   // set the SMTP port for the GMAIL server

$mail->Username   = "myaccount@gmail.com";  // GMAIL username
$mail->Password   = "mypassword";            // GMAIL password

$mail->AddReplyTo("mymail@gmail.com","My Name");

$mail->From       = "mymail@gmail.com";
$mail->FromName   = "test test";

$mail->Subject    = "PHPMailer Test Subject via gmail";

//$mail->Body       = "Hi,<br>This is the HTML BODY<br>";                      //HTML Body
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->WordWrap   = 50; // set word wrap

$mail->MsgHTML($body);

$mail->AddAddress("reciever@anymail.com", "Computer Addict");

$mail->AddAttachment("images/phpmailer.gif");             // attachment

$mail->IsHTML(true); // send as HTML

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}

?>


That's from the class, here's some PHP code that I tried:

Code:
<?
include("Mail.php");

$recipients = "reciever@gmail.com";

$headers["From"]    = "my@mail.com";
$headers["To"]      = "my@mail.com";
$headers["Subject"] = "Hey!";

$body = "TEST MESSAGE!";

$params["host"] = "smtp.gmail.com";
$params["port"] = "465";
$params["auth"] = true;
$params["username"] = "my@mail.com";
$params["password"] = "mypw";

echo "First Stage";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);

echo "Middle Stage";

// Send the mail off
$mail_object->send($recipients, $headers, $body);

echo "Final Stage";
?>


Now with this code, it does the first and middle stages, but it fails at sending off the mail. The request times out.

Any ideas? Some help would be really appreciated. I can't solve this :/

Author:  Sir Rogers [ Sat Oct 04, 2008 4:43 pm ]
Post subject: 

I've also tried imap. On freehostia and on my own XAMPP server. Everything is supported, the ports are not blocked by my ISP, because I checked, but still it's not working:

Here's the imap code, just in case that helps:

Code:
]
<?php

   $server = "imap.gmail.com";

   $user = "myacc@gmail.com";

   $pass = "mypass";

   $conn = @imap_open("\{$server:993/imap/ssl}INBOX", $user, $pass)
   or die("Connection to server failed -> ".imap_last_error());

?>


This is the error I get on freehostia
Connection to server failed -> Certificate failure for imap.gmail.com: unable to get local issuer certificate: /C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com

This is the error on my XAMPP server
Can't open mailbox \{imap.gmail.com:993/imap/ssl}Inbox: no such mailbox

Author:  Andy [ Sat Oct 04, 2008 6:10 pm ]
Post subject: 

Please open a trouble ticket regarding this issue. Then we will be able to assist you further. This you can do via "Help Center" menu of your Control Panel.

Looking forward to hearing from you.

Author:  twilight [ Tue Feb 15, 2011 5:25 am ]
Post subject: 

I am getting problem when I click send and receive button. As per my knowledge what coding done is perfect. But not able to get where is the problem. Because in every project for mails the coding is same. I am facing this problem first time.

Please help me out.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/