Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Gerben van Laar 12 posts 102 karma points
    May 12, 2018 @ 12:47
    Gerben van Laar

    Contact form using MailGun?

    Dear readers,

    I've been searching for a while now on how to use MailGun with a contact form for my site. But I am not sure on how to do this.

    I was thinking that maybe I could make a model and a surface controller. And in that particular controller I could send the output via MailGun to the intended e-mailaddress. Can you please point me in the right direction on how to solve my problem? Or is it even possible? Or is there a better way?

    Thanks is advance.


    PS: if you wish to read the documentation supplied by MailGun, here you have the link Don't forget to select C# underneath the header

  • Søren Mastrup 110 posts 495 karma points c-trib
    May 12, 2018 @ 19:42
    Søren Mastrup

    As you mention, you could use a surface controller and send the submitted data to mailgun using their api. I would recommend that you use RestSharp as they do in the examples. All you need to know about sending a simple message via mailgun is found in the link you have provided for Mailguns documentation.

    In the documentation, here on our, you can read more about submitting a form to a surface controller:

    If you need a full example, please let me know.

Please Sign in or register to post replies

Write your reply to: