Sending HTML elements through Mails - asp.net

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.

Related

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?

How to enable / force HTML in a private message sent via Rules?

I'm using the module Privatemsg on a website I'm currently working on.
I have a user which has a special Role ("system user") and which is only used to send automatic notifications, through private messages, to other users on the website.
This user is allowed to use my "HTML" text-format. When logged in with this special user account, I'm able to choose between "plain text" and "html" text formats while manually sending a private message. Plain text is set by default, though.
Every notification sent by this user is automatically generated and sent through Rules, using the "send message" action.
Unfortunately, I can't get the messages sent this way to take HTML into account (I need to put various internal links in those messages).
Is there a way to enable (or force) HTML in private messages sent by Rules?
Well, it's not exactly what I'd like to achieve, but until I find another (better) solution, there's a trick to allow this:
Go to the page Administration > Settings > Content authoring > Text formats, and drag/drop the "HTML" (or "Full HTML" or whatever text format you need) at the top of the list. This way, this text format will be used by default by the textarea in the "Send message" Rules action.
Note that as far as I'm concerned, this looks more than a "trick" than a real solution to this issue.
And also, note that I only allowed my "system user" to use the HTML format I placed on the top of the list, for obvious security reasons.

Using HTML5 for the content of an email, what is the alternative to an iframe?

In reference to this article https://www.campaignmonitor.com/blog/email-marketing/2010/08/do-iframes-work-in-email/, which I discovered AFTER I tried to embed an iframe in the body of an email, I need an alternative to an iframe that will work in the body of an email.
The basic problem is I need to provide an anchor with a link to a wav file (actually a cgi script that takes note of the date and time the wav file is requested and then forwards the request to the server that serves up the wav file),but I have been directed to not provide the wav file as an attachment, and to solve the problem that currently my email clients insist on opening another tab before attempting to do anything with the wav file.
I tested the iframe on a static web page, with an anchor that made the iframe the target, and it showed the precise behaviour I was after, but when I did the same thing in the body of the email, the iframe was actually removed and the target was set to '_blank'.
The issues related to google.com and similar not appearing in an iframe are irrelevant because under no circumstances am I showing someone else's content. Rather, I just want to display content without new tabs/pages opening, and this without using '_self' as the target (because I do not want to force the user off the page containing the link, as the wav file contains references to the content of the email - i.e. they need to be able to see the email while they're listening to the wav file).
Given the apparent hostility of email clients to iframes, what is the best alternative? It is this interaction of email clients with the HTML body of my emails that makes this different from all the other questions I have seen about iframes.
I repeat, what I have now is valid HTML5 usage of an iframe, and works fine when I serve content from my web server. My problem is gmail vandalizes/sabotages the content of my emails that use the iframe, as, it appears, do most email clients.

How to make sure that content is only rendered within an iframe

I am wondering how to make sure that I only ever show/render the content (send the code to the client) if the content is loaded in an iframe in a real browser, similar to the way Facebook checks when to display their like buttons and other social utilities.
There, when trying to simply load the content using curl, even when sending cookies, session details and user agent details, it still returns nothing. When trying to load the content outside an iframe, one receives nothing. How can that be achieved? I guess it is all but a simple process that involves multiple steps. I am especially interested in the first one, namely how to detect that it is really sent from a browser and not simply curled.
Thanks.
There is no way for your server to detect if it was sent using browser or curl, as the headers are easily forged.

navigating from one website page to an other website page

i want to carry a message from asp.net application to another social networking website through href html element and i need to display that message when i loggs into that website(into To textBox).
Please provide the answer .
You could add the data directly to the url like:
http://new.site/?data=data
or if the two sites can share a database you can insert that data into the database assigned with a hash, and you only pass the hash to the new site.
If I understand your question correctly (I'm almost sure I don't), it sounds like you can use a querystring value.
Your href attribute in an anchor tag would be like:
Link
"message" could also be a numerical value or another identifier that both the application and the website share information about.
The destination site reads the message value from the querystring, performs any necessary lookup, and presents the result message to the user.

Resources