Tom chan
Tom chan

Reputation: 365

How to use Contact Us form package for Meteorjs

I am using this package from Atmosphere.

https://atmospherejs.com/scalloped/contact-form

But I am unable to get it emailing to my accounts

Meteor.settings.contactForm = {
  emailTo: '[email protected]',
  emailSubject: function (params) {
    'Message from ' + params.name + ' via contact form'
  }
};

Upvotes: 0

Views: 492

Answers (1)

Peter Ilfrich
Peter Ilfrich

Reputation: 3816

Do you have a mail server configured? scalloped:contact-form requires the package email, which means you need an environment variable MAIL_URL. Email with Meteor is explained in detail here.

There is an article about Environment Variables in Meteor on Meteorpedia which explains how to set them. E.g:

export MAIL_URL="smtp://USERNAME:PASSWORD@HOST:PORT/"
meteor

Upvotes: 1

Related Questions