开发者

email send request to user [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

i want 开发者_JAVA技巧to create a button and one text box. now i want user can send any site of link to his friend how can i give this all. can i get any structure of code or can i get code that where i can create this.


<form action="mail.php" method="post">
<label for="email">your friend email</label>
<input name="email" type="edit"/>
<input type="submit" value="send link to friend"/>
</form>
<?
if (isset($_POST('email')) {
  if (!mail($_POST('email'), "Site link", "check this link " . $_SERVER['HTTP_REFERER'])) {
    echo "I couldn't send email, sorry.";
  }
}

?>


If you use something like PHP mailer on your site then you can integrate that into the mailing and make things really easy for yourself. Just add in the settings, build the e-mail and pass it through the functions that are needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜