Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i want to send email with attachment for the users who want to send email where user don't need to give the password of their email address.Because it's too much risky.I found a lot of topics but don't understand which one should i use.Again, it is important that the user may have any type of email address like gmail or yahoo etc.So, plz help here.
Posted

 
Share this answer
 
Comments
Adam R Harris 18-Dec-12 12:27pm    
This is your best solution. Krunal is absolutely right, he didn't say it but he implied it. You are going to need to use a SMTP server that is going to allow you to forward emails from another domain. You can use your own SMTP server or find a hosted solution but it is critical that the SMPT server allows Relays (i think thats what its called) and also allows you to send emails from another domain i.e. sending email from tom@somedomain.com through steve@anotherdomain.com.
[no name] 18-Dec-12 12:47pm    
Thanks Adams.. Let's see how he reacts on it !! ^_^
symonsarwar 18-Dec-12 13:29pm    
SAYS..SMTP SERVER NAME REQUIRED
Hi,

I don't think it's possible to send an email without the user gives the password of his email address. Here's a link to a tip:
Sending an Email in C# with or without attachments: generic routine.[^]
If you use the code of the tip, users must give their password.
 
Share this answer
 
Comments
M.Edmison 18-Dec-12 14:54pm    
You can if you have access to the server in terms of an admin and it is a Intranet server. YOu can do the MAPI method and set the send from just like setting the variable. however if its an external smtp server, I would agree.

This might be what your saying, just adding for clarity.
Thanks
 
Share this answer
 
Comments
symonsarwar 18-Dec-12 13:17pm    
it gives error in
smtp.Send(mailMessage);
......what should i do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900