How to send email from blogspot or blogger
Step1: Take free domain and add one test.php file in it.
You can create your free domain here
Step2: Now add following code in your test.php file.
<?php
$id = $_REQUEST['id'];
$msg = $_REQUEST['msg'];
$to = "someone@example.com";
$subject = "Test mail"; $message = $id.'='.$msg;
$from = "someonelse@example.com";
$headers = "From:" . $from; mail($to,$subject,$message,$headers);
?>
Step3: Add HTML/javascript Gadget and add following code in it.
<script type="text/javascript">
jQuery(document).ready(function() {
var pathName = jQuery(location).attr('href');
var msg = "This is a testing email from above page";
jQuery.ajax({
dataType: 'jsonp',
data: "id=" + pathName + "&msg=" + msg,
jsonp: 'jsonp_callback',
url: 'http://test.site90.net/myfiles/test.php',
success: function () {
}
});
});
</script>
That's it.
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment