Can't seem to figure out why my line breaks aren't working. Any help would be greatly appreciated. I'm using the firebase Email Trigger extension to send a registration confirmation email. I want to add multiple lines to the text, but the line breaks won't carry over once the email has been delivered. Inside my firebase function I have the following:
to: email,
message: {
subject: "Thanks you for registering!",
html: `
Hey ${firstName || ""}!
We wanted to take a moment to thank you for signing up with us. We are thrilled to have you on board and can't wait to help you achieve your Real Estate Wholesaling and Investing goals.
We are dedicated to providing the best Wholesaling tools to help you succeed. If you have any questions or need assistance, our team is always here to help.
Thank you again for choosing us, we can't wait to see how you use our platform!`,
},
I've tried using \n\n as well as \r\n\r\n but those don't work either. It's all just one paragraph when I open it in my email.
Any thoughts as to how this can be solved? Thanks in advance!
You can use html tags to get the behavior you want.
For example the <p> tag will create a paragraph with space above and below it.
The following will get you what you want
to: email,
message: {
subject: "Thanks you for registering!",
html: `
<p>Hey ${firstName || ""}!</p>
<p>We wanted to take a moment to thank you for signing up with us. We are thrilled to have you on board and can't wait to help you achieve your Real Estate Wholesaling and Investing goals.</p>
<p>We are dedicated to providing the best Wholesaling tools to help you succeed. If you have any questions or need assistance, our team is always here to help.</p>
<p>Thank you again for choosing us, we can't wait to see how you use our platform!</p>`,
},
If you want multiple lines in between you can add a <br/> tag to create a new line as well.
Related
I understand that this question might have been asked before, but looking at the answers is just making me more confused! I was wondering if someone could tell me the steps I should take to deliver this scenario?
A user is logged into my website
They open a live chat window (powered through Zendesk)
At this point, a live chat is opened in the zendesk support channel, but the name of the "user" is something generic like "Visitor 12345". I would like Wordpress to send the logged in users name and email address to Zendesk so the chat appears as "Member Name".
I think I need to use a Rest API for this. I have inputted the following code into my functions.php file. (which I found here).
<script type="text/javascript">
zE('webWidget', 'identify', {
name: 'Akira Kogane',
email: 'akira#voltron.com',
organization: 'Voltron, Inc.'
});
</script>
But I am unsure of what to change "Akira Kogane" "akira#voltron.com" and "Voltron, Inc." to?
If anyone could point me to an idiots guide to setting WordPress up to be able to send this data I would really appreciate it. I would happily pay someone to do this work for me, but I would love to learn how to do it myself in the first place. I assume I have to set something up in wordpress, or set up a rest API somehow before it can send the data, but I'm not sure!
Thanks Again!
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.
In general, how do you display client-side validation messages on a web page to make it easy to read out? Alerts are read out nice but are forbidden in the current design.
I'd suggest using a paragraph or similar (optionally invisible) with a role of alert.
<p id="error-msg" role="alert"></p>
When something goes wrong, put the text in the error-msg element, with Javascript of some description.
document.getElementById("error-msg").innerHTML="What are you doing you fool!";
Or something to that effect.
I believe this is what YouTube uses to let a user know when a new video in a playlist is loading.
Hope this helps.
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.
Alright, I fear I may be critiqued for this not being so much of a "programming" question, but I'll ask anyway. I don't do to much in web development-type stuff (OO is what I stick with mostly), so I'm not too keen on exactly how all this CSS, Javascript, SQL, etc works.
The problem: My friend has been trying to quit smoking for a while, but as many smokers do, he seems to only make it so far. He recently posted a status update saying if he had the moral support, he could do it. I simple want to create a link to the "Like" button. I then intend to write a script and simple message all his friends with the link. Is this possible?
Any tips in the right direction would be greatly appreciated. An explanation of how to do this would be divine. An explanation of why I can't do this would be met with a scowling acceptance and a thank-you.
For those who don't have a facebook, here are some pastebins. Anything else you need I'll try to supply
Pastebin of a my facebook.com/homepage page source:
http://paste.uni.cc/19860
Pastebin of his homepage as I see it page source:
http://paste.uni.cc/19860
His update to ctrl+F and see surrounding code:
"would quit smoking if he had the moral support."
Thing that looks to me like the css code for the "like" command
http://static.ak.fbcdn.net/rsrc.php/z2FUI/l/8fkujrwg/en_US/151675/css/like/like.css
Will this stop him from smoking? Most likely not, but it can't hurt. Worst case he'll just get a laugh and maybe feel a bit more inclined to drop the cigs.
Appreciate it as always.
The "Like link" is a Javascript-backed element which invokes an AJAX call to the server. It carries a unique ID which is keyed off both the item being "liked" and the user who pulled down the page (in this case, you) to ensure duplicate "likes" are not accidentally submitted and the UI to become out of sync with the DB; and to ensure you can't "like" something on another user's behalf. The case you are describing is indiscernible from a malicious attempt at doing the same thing.
Can you just send them a message with a link to the friend's page and tell them to "Like" the status themselves?
Why not write a Facebook application and plug directly into your own profile. You could invite his friends to your application, which would allow them to support your friend's attempt to quit smoking without having to hack together a script that "clicks" the Like link. The hack could easily be considered malicious.