一些免费邮件服务器发送邮件

时间:2011-01-03 12:30:45

标签: php phpmailer

因为我们没有邮件服务器。是否可以使用任何邮件服务器自由发送电子邮件使用PHP邮件程序。说一些免费邮件服务器用于我的目的

4 个答案:

答案 0 :(得分:3)

您可以像这样使用Gmail:

<?php
require("class.phpmailer.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com:465';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'fake[ @ ] googlemail.com';  // Change this to your gmail adress
$mailer->Password = 'fakepassword';  // Change this to your gmail password
$mailer->From = 'fake[ @ ] googlemail.com';  // This HAVE TO be your gmail adress
$mailer->FromName = 'fake'; // This is the from name in the email, you can put anything you like here
$mailer->Body = 'This is the main body of the email';
$mailer->Subject = 'This is the subject of the email';
$mailer->AddAddress('fake2[ @ ] gmail.com');  // This is where you put the email adress of the person you want to mail
if(!$mailer->Send())
{
   echo "Message was not sent<br/ >";
   echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
   echo "Message has been sent";
}
?>

答案 1 :(得分:0)

通常,没有。因为这对垃圾邮件发送者来说是显而易见的(参见Wikpedia)。不过,您可能也可以在ISP使用邮件服务器。

答案 2 :(得分:0)

我在家用计算机上使用hMailServer来测试与邮件相关的组件。但是,它要求您已拥有邮件服务器。所以我将我的GMail帐户设置为hMailServer并使用它。已经工作2年了。

http://www.hmailserver.com/

关于GMail的唯一问题是发出的所有电子邮件都在您的GMail地址中。

答案 3 :(得分:0)

有多种免费系统可供使用(例如,Google Apps for your Domain)。这些将有发送限制(谷歌是每个发送帐户500个唯一收件人,我听到的最后一个),当然还有免费服务,你非常受制于提供服务的组织的一时兴起。免费服务倾向于以非常不干涉和冒险的方式运行(当然!),所以任何不寻常的事情都会让你在很少(如果有的话)追索的情况下关闭。

免费的下一步是便宜。在我的案例RunBox中,我从便宜的服务中得到了很好的结果。我通过RunBox发送,通过Google Apps接收(因为Google的优秀垃圾邮件过滤功能),而且费用很低。如果我给他们发电子邮件问题,他们实际上会回应。这并不意味着对它们的具体认可(除了作为客户之外我没有任何从属关系),只是有时只需支付位的注释就会给你带来很多。

相关问题