dtrn74832 2010-12-13 22:09
浏览 22
已采纳

JangoSMTP问题与php邮件功能有关

that's right I am back with another php problem I recently asked another question about php mail with smtp2go

I was discouraged about it so I tried getting an email address with 000webhost I set it up with Thunderbird and tested it out

I used jangosmtp as my smtp server (outgoing)

and used 000webhost's incoming as imap it worked fine I could send and receive emails so I then took it to the next level... using php here is my code

send.php:

<html>
<form method="post" action="send.php">
Topic: <br/><input type="text" name="topic"/><br/>
Message: <br/><textarea name="message"></textarea><br/>
<input type="submit" value="Send" name="submit"/>
</form>
</html>
<?php
if ($_POST['submit']){
ini_set("SMTP", "relay.jangosmtp.net");
ini_set("smtp_port", 2525);
$to = "lsworkemail112@gmail.com";  
$subj = $_POST['topic'];
$body = $_POST['message'];
$header = "From: lsworkemail112@gmail.com";
if (mail($to, $subj, $body, $header))
{
echo "Message sent successfully";
}
else
{
 echo "Message sent unsuccessfully";
 }
 }
 ?>

when I run this code the form appears ok but when I press send

this is what I see

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 ... we do not relay in C:\xampp\htdocs> \send.php on line 16

Message sent unsuccessfully

I followed these instructions I set up both an ip address and a relay email

lsworkemail112@gmail.com

I tried multiple times with different conbinations of email address but it still did not work

  • 写回答

1条回答 默认 最新

  • douhunbei0166 2010-12-14 21:49
    关注

    Check out http://blog.jangomail.com/2010/11/technical-notes-using-jangomail-api.html and see PHP Sample #2: Send a Transactional Email. That should eliminate the problem completely. If you still need help, contact our support team: www.jangosmtp.com/Support or 1-888-709-4099. Hope this helps!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题