How to incorporate Html in client script code? - google-app-maker

I was trying to send email using send button. Inside the save button I have added some code to declare : to, subject and email body. I want to make the email body a bit nice, by adding some html like h1/h5, p. etc
I have tried to added the html tags like h1/h2 etc or p.. but those part also pops up in the email.
"<html><body><h1>Description:</h1></body></html>\n\t\t" + widgets.Objective.value

The reason that is probably happening is because when you are sending the email, you are not doing it correctly. The code you have provided is not really helpful, so I'm only guessing that your logic to send the email on the server side is not the way it should be. Take as a reference the following code snippet:
MailApp.sendEmail({
to: "recipient#example.com",
subject: "Test Email",
htmlBody: "<html><body><h1>Description:</h1></body></html>\n\t\t"
});
Reference: https://developers.google.com/apps-script/reference/mail/mail-app#sendEmail(Object)
P.S. If this answer is not helpful, please considering editing your question and please include your server side code as well since the current way your question is being asked leaves too much questions flying around.

Related

How to code reCaptcha to protect email address

I am trying to protect the "mailto" code function on a website from bots and spammers. In other words, I would like to create a button (like "Contact") that on clicking displays an email address, but the code is protected from harvesters.
reCaptcha has been suggested. Can it serve that purpose?
I have been to https://www.google.com/recaptcha/ where I created an "account" but I cannot figure out how to use it.
If I am asking the wrong question in the wrong place, please say so. (I am pretty good with HTML and CSS, but reCaptcha has me stumped.)
sjahan, Thank you.
stackoverflow offers other solutions that I just found here:
Protect e-mail address with CSS only
I will start there. But I have bookmarked this page.

JXBrowser, intercepting loading of a script, and change it's contents.

I know you can add a LoadAdapter, and implement onStartLoadingFrame
but is it possible to modify the response? IE the content sent to the client. I cant seem to see the responseText anywhere yet to modify it.
You can use CustomProtocolHandler to response with custom data.
Please take a loot at the article for details.

Change Forgot Password text Firebase [duplicate]

I am working on a Application with firebase. I want to validat a users email, but since Firebase doesn't allow to change the verification message (To help prevent spam, the message can't be edited on this email template), i can't use this. I don't want to serve English text to my users.
Is there a way to get/generate a custom ActionCode? I used this tut https://firebase.google.com/docs/auth/custom-email-handler it might solve the problem is i can get the temp actioncode somewhere.
I found applyActionCode and checkActionCode (seems the same) but not something like createActionCode
Ask for it...
Nowadays the best procedure (with just 1 step) was for us to develop an HTML file with the exact content for each of your templates (Email-Verification and Email-Change, including even the snippets %...% in the right place) and send them as attachment in the Troubleshoot form as mentioned by Alfonso in the comments of this question.
If you send the exact email HTML template file, you leave Google's people with no questions for spamming purposes other than quickly validating your HTML content and approve.
you can change the language for all the templates, at the bottom...
also you can edit manually the body and the subject for the forgot password template
You can customize the email validation template text as you wish? Right?

Remove the footer in mailchimp

I'm sending auto mail for my new subscribers via MailChimp, the mail is sent and every thing is fine but with a footer which gives user option to unsubscribe from the list...anyway I'm trying to disable that footer but all comes in vain, I tried to set the auto footer to false but nothing happens and here is sample of my code
var campaignCreateOpt = new campaignCreateOptions
{
list_id = listID,
subject = Subject,
from_email = from_Email,
from_name = from_Name,
template_id = 0,
auto_footer = false
};
I think you'll have a better chance of your email getting out to most of your list if you allow the unsubscribe.
It's generally not smart to not give people an option to unsubscribe. If they do not see an unsubscribe option, they can mark you as spam. If you get too many "spam" complaints, your email may not reach the inboxes of even the people who would like to stay subscribed.
I doubt mailchimp will allow removal of the unsubscribe.
Reasons:
Mailchimp's Terms of Service does not allow you to send an e-mail
without the unsubscribe link. If you don't provide the unsubscribe
link, they will insert it using the gray footer bar.
Also, if your account is free, and you don't use the REWARDS tag,
they will also insert it through the gray bar.
The third probable reason is that if your code is complicated or
broken, they might see it as an attempt to hide their UNSUBSCRIBE or
REWARDS tag, so they will automatically add the gray bar to your
e-mail.
Hope I helped you.
Source: http://kb.mailchimp.com/article/why-am-i-getting-a-gray-bar-or-a-2nd-footer-that-i-cant-edit
I took the time to invest some further and maybe have to apologize to Mahmoud Ghoz and I will if you can test the following for me.
Probably the following is happening: your not including a *|UNSUB|* tag or you use a free account and not including a *|REWARDS|* tag? If this is the case, the footer will always be added no matter which value you use for the auto_footer property.
So try to include a *|REWARDS|* and *|UNSUB|* tag in your mail and do a recheck. Please let's us know if it works. But like I said earlier you account can be temporary locked if you get to many spam warnings which could be the case if you not supply a unsub link.
I guess this is not allowed for free user to do so
I had a similar problem, it turns out that my issue was a background image (in inline styles) in the footer. MC clearly thought I was trying to hide the unsubscribe link! I have removed and all is now good.

Sending HTML elements through Mails

I want to open a mail client on click of a link.
I am using this code:
System.Diagnostics.Process.Start("mailto:email address?subject=[subject text]&body=http://google.com'>here");
its opening the mail client but I am unable to get the link(here).It should come as a link. Is there any way to do it through IsBodyHtml=true?
Can anyone help?
Thanks.
All you are doing there is creating a mailto: link which is just passed to the default email client to process. Although most email clients support address, subject and body I don't think there's any way to force a particular body format, it's entirely up to the client application what it does with that content.
Would changing it to "please visit http://google.com" not suffice? Most email clients will automatically hyperlink anything that looks like a link when you read the email.
If you want to open the users default mailclient just use a mailto link
text
I don't really understand where and when you are running the "Proccess.Start" code but if you want to open a mailclient though the browser a "mailto"-link is the way to go.
You can set subject for the email that opens but that's about it (depending on default mailclient). Doing more like sending etc. would be a securityrisk.
If you need to do more complex things create a form instead for the user to fill in.

Resources