Is there any way to set email profile picture using MailMessage in C# or any similar methods that may do that? - c#

I've made a very simple C# -based console application which sends email to the email receiver specified using MailMessage.To.
But I just couldn't find any resources on how to add or set up an email profile picture using C#.
Is there any way to do so by using C#?

If you mean someting like profile picture in Google email view I believe the profile picture is not a part of an email.
It's retrieved from your profile by Gmail when it displays the email and the result depends on whether you have the right settings for your profile.
Please see this answer for more info.

Related

Submitting data through email using asp.net

I am creating a application that will send emails to users requesting some information to be filled.
The user must be able to fill the informations requested.
What should be the right approach to achieve this ,
A html form should do this or a link should be given to every different user
Email has no interactive capabilities, so you can't embed a form in the email message like you would in a webpage.
A decent solution is to embed a link in the email which takes the user to a page on your app where they can fill in a form and submit the answer to you, like with any webform.
Since you have an email for each user, you could generate the link as myapp.com/responses/${some_part_dependent_on_email}. Where the ${some_part_dependent_on_email} can be a hash of the email or some bijective function of the email. The first option requires that you do a more complex join to find out to which email a response belongs to, whereas the second one might expose users emails in the URLs, which is not so great.

How can you send an email to another users email without opening the mail? Xamarin Forms

I am building an app in Xamarin Forms where you can buy products etc. Now I am at the stage where I want to send the user a confirmation when their order has been placed.
I have a string cointaining their email but I am not quite sure how to proceed. When I have previously worked with mail it looks something like this:
Device.OpenUri(new Uri("mailto:ryan.hatfield#test.com?subject=free candy&body=you can trust me"));
And what this does is that you open your own mail and you have to send it yourself to yourself which obviously is wrong.
So my question is, how can I send a confirmation email from my email to their inputted email which I have stored in a string?
You have a few options. If your email is a Microsoft Exchange mailbox, you can use Exchange Web Services (EWS), which is fairly simple if you follow code samples online. Otherwise, you should use an SMTP client. .NET has its own that you can include: System.Net.Mail, or you can find a number of libraries online.
If you're inclined toward the .NET SMTP option, I would take a look at this question. It has a fairly complete example that should help you get started.
EDIT: You mentioned that your backend is PHP-Based. There are plenty of SMTP libraries for PHP as well and plenty of code samples. Here's another SO question I'd suggest you look at to help you get started in PHP instead of C#.

Validate Yahoo and Gmail Login

I am required to write a small webpage / utility for both Google and Yahoo to validate their email addresses. Suppose I give two textboxes, one for Yahoo and the other for Google. When the user provides the email addresses and hit the GO button I want to show if the provided emails actually exist and are valid or not. Plus, I would also like to show any publicly available information like Name, Date of Creation of Account or anything else that is available.
I have tried searching the net but was unable to find any helpful material. Hence asking the question here.
Sounds like you need to implement oauth in your application. By doing so, the user can click on the button of a network and login there. The user will be redirected back to your application with some details (depending on the settings), in most cases you will get the email address and user name.
The simplest way to implement oauth I found was with Simple Authentication: https://github.com/SimpleAuthentication/SimpleAuthentication
An implementation I made: http://www.zonneprijzen.nl/Account after login go to: http://www.zonneprijzen.nl/User/Edit
Hopefully this solved your problem.

how to check if a given email address actually exist in c#?

I am building a C# application where users creat an account and type their email address,
I know how to validate it with Regular expression, what I am having truble with is how to check if that email actually exist?
i.e. lilush#gmail.com --> is there such email address?
Thanks!
The only way to check this is to send an email to that address and make sure that you send a link that needs to be clicked to activate the account. There is no other way to check if an email is correct
Have a look at EmailVerify.NET
EmailVerify.NET is a powerful Microsoft .NET software component that verifies e-mail addresses with various tools, including:
Advanced syntax verification, according to IETF standards (RFC 2821 and RFC 2822, among others)
DNS validations, including MX record(s) lookup
Disposable e-mail address (DEA) validation
SMTP connection and availability checking
Mailbox existence checking, with greylisting and temporary unavailability support
Catch-all testing
There's only one way to do that: Send an email containing a (unique, of course) link to the address, and ask the user to click the link.
If you wanted to be really fancy you could embed an image in the email as-well. When your server detects that the image was downloaded then you know they opened the email. This also removes the need for the clicking a link thing which many people either don't trust or it doesn't work. Just a thought.

How to get the incoming email address -Sharepoint?

I want to send the email to the sharepoint adminsitrator when user clicks the form button. How I can achieve this ?
The simplest solution for this scenario is to create a workflow with SharePoint Designer 2007. Here is an article that describes how to create a workflow that sends an email. You can manually choose administrators you want to mail, but it is much better approach to create a SharePoint group for admins and send an email to this group.
Make sure you have properly configured SharePoint outgoing email settings.
Upvoted Toni's but since the OP tagged it as C#, the function to send emails using the Central Administration is called SPUtiliy.SendEmail. To grab the email of the user (if you dont know the email) you could go with something like SPContext.Current.Web.AllUsers["DOMAIN\login"].Email (not test environment here, syntax may be off)

Categories