Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

How to send email from blogspot or blogger


Send email from blogspot or blogger

Blogspot not sporting php code so you can not use php code to send email from your blog. If you want to do it you need to use jQuery and have to call to another server to send email as following.

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.

0 comments:

Post a Comment

 

Copyright @ 2017 HKBlog.