Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 18-Dec-12 6:04am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Adam R Harris at 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.
Krunal Rohit at 18-Dec-12 12:47pm
   
Thanks Adams.. Let's see how he reacts on it !! ^_^
symonsarwar at 18-Dec-12 13:29pm
   
SAYS..SMTP SERVER NAME REQUIRED
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
wolfcoder75 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Comments
symonsarwar at 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)

  Print Answers RSS
0 OriginalGriff 358
1 Sergey Alexandrovich Kryukov 239
2 MT_ 175
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,205
1 OriginalGriff 5,333
2 CPallini 2,473
3 Richard MacCutchan 1,617
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web04 | 2.8.140814.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100