开发者

how to send information to an email from php/jsp/ruby/perl

In php/jsp/ruby or perl...how hard is it to send information to an email? I am planning to have something where user puts in the information from an html form, information gets sent back to the server, server puts it in DB, then we send an email to the user. This is very basic functianality that I've seen many sites do.

Can someone please point me to some examples of how to send emails and wh开发者_如何学Cat the requirements are for that. like do I need my own smtp server? Can I simply send emails using my gmail?


in php it's easy indeed:

<?php
if($_POST['submit']) {
$title = ''
$message = ''
$to = 'any@mail.net'
mail($to, $title, $message);
exit()


This is pretty easy in most of languages. Whatever your choice will be you can afford this easily I think. Your only requirement is to establish connection to a SMTP server (which can be done by using popular public libraries). and then you can use gmail to send emails if you provide configruration to gmail smtp server with your account password.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜