Custom widget send email

Options
jenmagjen
jenmagjen Member Posts: 13

Hi,

I have searched the docs and community threads without any result.

Duda has a contact form. This generates an email, which is intended for site admins, and not customers.

I was wondering if it is possible to send email with message body and recepients generated from a custom widget, by posting the proper strings from JS in the custom widget and into the built in email-sender in Duda.

I could of course use a smtpjs or similiar, but then I need to enter email address and pwd in the JS.. best to avoid that.

So I'm hoping more of a kind of api which lets me have full control over the emails recepients, subject and body, being sent from the same address as the regular contact form. I can output the mail details in a json string from the widget, but need some place to post it.

Answers

  • jenmagjen
    jenmagjen Member Posts: 13
    Options

    I'm aware of a possible tweak: Inserting a regular contact form, tweaking and hiding stuff, and then using jquery in the custom widget:

    var myVar = "Hello world";

    $('#idOfMessageTextarea').val(myVar);

    And the same with subject, recepients. This works, but is a bad workaround. And the email is probably the same as a json-string which posts the request into the request-overview.

    The email is intended for customers, which should be able to get the output of the custom widget emailed to them, as well as a copy to the site admin.

  • Shane_Hodge
    Shane_Hodge Member Posts: 122 MVP
    Options

    Hi @jenmagjen Im not a technical person but every-time I read form questions the usual answer is jotforms hope that helps.