Microsoft
Software
Hardware
Network
Question : Email an attachment in C# Windows application
We are developing a .Net Windows application in C# for commercial distribution.
Objective
I want to add a function to allow the user to email a file to any email recipient from within the application without needing an email client on their PC, just an internet connection. The email they send needs to appear that it has come from them (i.e. their email address is in the FROM/REPLYTO field) so that the recipient can identify where the email has come from and they can reply to it.
Current Approach
I was intending to use the MailMessage class in System.Net.Mail, but it requires an SMTP server to send the email. The problem with that is, i dont want the user to have to configure anything to send emails from our application - i want it set up by us. In other words, i want to define what SMTP server to send the email from and hardcode it in the application.
I have tried to use Gmail as the SMTP server, however one major drawback - Gmail automatically rewrites the "From" line of any e-mail you send via their SMTP gateway to your Gmail address, so when we tested this, even though in the MailMessage code we set the FROM property to
[email protected]
, when the email was received, the From field displayed
[email protected]
Questions
If this software is going to be distributed to many users in different network environments, is this method the best to use? If so, is there a free/public SMTP server i can use for our application to achieve this that will allow the end-user to define the FROM and REPLYTO fields?
Is there any other method i could use to achieve my original objective?
Thanks
Answer : Email an attachment in C# Windows application
I only have version 12 here.
Try searching the registry for "Agent Directory List" that might do it.
Random Solutions
AD Delegation Report
start win xp without login
How to set PTR in if your DNS host private IP
T-SQL query question about row_number()
How to enqueue a song in an open winamp player using javascript
Anyway to search a large text file without loading it into memory?
linear approximations and percentage error
Access 2003 in report how to change the results of data
How do I split .Net 4.0 Windows Form event handlers into separate files?
counts records in a query