使用phpmailer将短信从电子邮件发送到手机,但它无法正常工作 [英] sending sms from email to phone using phpmailer but its not working

查看:173
本文介绍了使用phpmailer将短信从电子邮件发送到手机,但它无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将短信从我的电子邮件ID发送到手机。我正在使用phpmailer执行此任务。

我在浏览器上输出的输出是bool(true)



我发送短信的电子邮件ID收到包含以下数据的失败邮件



I want to send sms from my email id to phone.I am using phpmailer for this task.
The output i am getting on my browser is bool(true)

And the email id from where i am sending the sms getting failure mail which contain the following data

Delivery to the following recipient failed permanently:

     7696889076@tatadocomo.com

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain tatadocomo.com by mail5.tatadocomo.com. [59.161.166.190].

The error that the other server returned was:
550 5.1.1 Recipient address not found: The User you are trying to send the message is not found.  Check the email address and re-send the message.









我为发送短信而编写的代码是



.

The code i have written for sending sms is

<?php

if(isset($_REQUEST['send']))

{

$subject =$_POST['subject'];

     $message = $_POST['message'];



    require_once('phpmailer/class.phpmailer.php');



$mail             = new PHPMailer();



$mail->IsSMTP();
$mail->SMTPAuth   = true;
$mail->SMTPSecure = "tls";
$mail->Username   = "kakminder@gmail.com";
$mail->Password   = "9816537568";
$mail->Host       = "smtp.gmail.com";
$mail->Port       = 587;

$mail->SetFrom('kakminder@gmail.com', 'akminder');
$mail->Subject    = 'hello';
$mail->Body    = 'this is a testing mail';
$mail->AddAddress('9888418115@vodafone.co.in','mandeep');

var_dump( $mail->send() );
   }
     ?>
     <html>
     <form name="frm" method="post" action="">
     <table><tr><td><input type="text" name="subject" placeholder="enter msg here" /></td><td><input type="text"name="message" placeholder="enter message" /></td></tr>
     <div><input type="submit" name="send" value="send" /></div></form>
     </html>









我不知道为什么我的短信没有被发送。请帮助。



提前谢谢





I dont know why my sms's are nt getting sent.pls help.

Thanks in advance

推荐答案

_REQUEST [ 'send']))

{

_REQUEST['send'])) {


subject =
subject =


_POST [' subject'];

_POST['subject'];


这篇关于使用phpmailer将短信从电子邮件发送到手机,但它无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆