Problem with contact form

it does not look like your read my answer in the other community...
here is it again

this is a php server solution…
which means, if the server http://email.etvbanglanews.com/a/mailer.php which will be used to send the mail will go down, all apps, which use this extension will not work anymore

yes, you will have to trust the developer of that solution, that your data will not be misused…

for other email solutions see the overview here App Inventor Tutorials and Examples: Send Mail | Pura Vida Apps

Taifun

1 Like

Thank you so much, @ABG!

The problem is that I would like to find an option to create a contact form an send the message directly to an email address.

I have seen what you sent me and it is to send an email. When I push the button "submit" the app shows Gmail window to send the message.

It is more complicated than I thought. :pensive:

Use a google form

1 Like

this depends on the solution you have chosen... unfortunately we do not know, what you are doing without a screenshot of your relevant blocks...

there are so many solutions to choose from...

Taifun

1 Like

This is my simple example to send a simple email form using email.. You could try it.and adapt it to your needs. :slight_smile:

1 Like

@Taifun, I would like to add in my project a contact form exactly like that: How to Create a Contact Us form in MIT App Inventor 2 - YouTube

The problem is that the extension of this tutorial doesn't work.

You are very king, @SteveJG. I'll try to do it when I come back from class and I'll let you know how it is going.

Thank you so much! :blush:

@TIMAI2, it's a good option, but I think it is not possible to change the format. If I don't find other way, I'll do it like this.

Thank you so much!

@SteveJG, how could I specify the email where I would like to receive the message? Where could I add it, please?

To expand on this:

You can use the web component to replicate the google form (see here for example)
You can then setup a function on the responses google sheet, like this:

function onFormSubmit(e) {
  var values = e.namedValues;
  var htmlBody = '<ol>';
  for (Key in values) {
    var label = Key;
    var data = values[Key];
    htmlBody += '<li>' + label + ": " + data + '</li>';
  };
  htmlBody += '</ol>';
  GmailApp.sendEmail('email@address.com','A New Response From App','',{htmlBody:htmlBody});
  
}

and a trigger

I have been using this setup for years on my website, without error.

1 Like

You have options since you create your own 'form' using code.

I would put it in the Msg2 position (Label4) just like this: 'myEmail@gmail.com' or 'myEmail@yahoo.com'

When your email is sent you have the option to select your sending email client to send the email. In your CONTACT script, I would put it in the Msg2 position (Label4) just like this: 'myEmail@gmail.com' or 'myEmail@yahoo.com' (or add another Label with the information so you do not have to type it in. (without the single quote mark ')

When the other party receives your email, that address becomes a clickable link in the CONTACT message.

You can hard code the CONTACT information on the 'form' and only need to type the recipient email address.

1 Like

Hello everybody!

After consulting all the information you have provided me, I made the contact form like this:

When the people click "submit", Gmail will open and they will be able to send the email. Then, Gmail will be close to go back to the app.

What do you think about it?

However, I have a doubt: in the block "join", in the last string, instead of Gabriel I would like it to show the name that the user writes in the textbox "Your name...". How could I do that, please?

Thanks a lot in advance!

Perhaps

sentby

where TextBox1.Text contains the name. :astonished:

1 Like

Oh, that's true. It's obvious. I thought I had to write some code after "\n\nsent by", in the same box. I have been working on this project for a long time and my head is about to explode, jaja. Thanks, @SteveJG! :+1:

Well, it is now working perfectly. Hopefully it can help other people who are looking for the same.

You have been very kind. Thank you all for your help! :blush:

For good measure, consider scrubbing those textbox contents through a Web1.URIEncode block to avoid poisoning by '&' in Subject or Body.

1 Like

Simple, effective and user-centric. Sometimes we try too hard to do everything inside the app, rather than use what is already there.

2 Likes

Do you mean replace the block "join" with the block "Web1.URIEncode" and add here the textboxes of mailto, subject, body and sent by?

Yes, that's true. I often have the same problem. Many times, we can achieve great things following a practical and simple way.

No.

You need that JOIN.

Experiment with this subject for an email:

I like M&M candy, do you?

Tell us what happens if you try to use that in an email.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.