Git Product home page Git Product logo

Comments (4)

otraore avatar otraore commented on July 3, 2024

What language/library are you using? There are examples showing how to send html.

from documentation.

kevinsimper avatar kevinsimper commented on July 3, 2024

There is very few examples of html emails. I can only count two and they are very small.

from documentation.

otraore avatar otraore commented on July 3, 2024

I think it's because to send html version you only need to add in an extra parameter for existing libraries out there.

For example:
Ruby (Just Text)

def send_simple_message
  RestClient.post "https://api:YOUR_API_KEY"\
  "@api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages",
  :from => "Excited User <mailgun@YOUR_DOMAIN_NAME>",
  :to => "[email protected], YOU@YOUR_DOMAIN_NAME",
  :subject => "Hello",
  :text => "Testing some Mailgun awesomness!"
end

Ruby (Text & HTML)

def send_simple_message
  RestClient.post "https://api:YOUR_API_KEY"\
  "@api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages",
  :from => "Excited User <mailgun@YOUR_DOMAIN_NAME>",
  :to => "[email protected], YOU@YOUR_DOMAIN_NAME",
  :subject => "Hello",
  :text => "Testing some Mailgun awesomness!",
  :html => "<h1>Testing some Mailgun awesomeness!"
end

from documentation.

 avatar commented on July 3, 2024

I am facing issue with HTML email. I followed the directions given in the documentation. Can someone tell me how to include links in "html" property as it's value is string? Whatever HTML I am writing, it is printed as a string. If I am trying to concatenate strings for "html" property then it is a syntax error as we have to include all html format inside a string.

I am using python language.

from documentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.