Click here to Skip to main content
16,016,306 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,

I would like to develop an option in my project to contact the seller. It should something like Ebay contact seller. The from and replay mail ids should be from my domain and the message should be sent to the seller. How do I can develop a contact seller option via email like Ebay.


Thanks in advance.
Posted
Updated 20-Mar-15 1:35am
v2

You should know that there is something know as a variable in programming. Which can be filled with any value that your application (or more specifically "you") want to use. So for example, if you use the WebMail class to send the email, then the following code would be used,

C#
// client, subjectOfMessage and whatToSend are variables

WebMail.Send(to: client, 
             subject: subjectOfMessage,
             body: whatToSend);


You can fill the above variables, to send the email from which so ever account to which so ever recipient using which so ever SMTP server on which so ever event (Sorry for a lot of "which-so-ever"s). You can fill the values for your organisation or for your particular client; WebMail would send the email with that data. For more on sending emails in ASP.NET, you can read this article[^] of mine.
 
Share this answer
 
1) You need the email-addresses of your users - you probably already have them.

2) When clicking on a user name or as an option in a users profile a form for writing a message to that user should be accessible.

3) When the user confirms to send the message, you send it to the recipients email address with an email-address of your system as the sender. The only email-address the recipient will see is his own. To allow him replying to that message you insert an automatically generated link in the footer of the message that points to your server and includes only the ID of the user who should receive it and also a one-time-token or timeout-token (simply some random identifier which you will invalidate at some point so the link can't be used over and over again to send a reply). The aforementioned ID should be the ID that your system knows the receiving user by internally.

4) When the recipient clicks on that link, your system recognizes the ID and the token and if both are valid, you present him the same form and functionality for sending a message, just with reversed roles of those two users.

[edit: clarifications]
 
Share this answer
 
v3
Comments
Ajith_joseph 20-Mar-15 8:22am    
Thank you for the answer. I don't want to show the users email id to the seller. The functionality should be same like ebay. The from and replay mail ids should be from my domain. For eg. once if the seller sent the message to sfadfddf@mydomain.com and it should send to the user's email id. Which means the users and sellers can't see their email ids for direct contact.
[no name] 20-Mar-15 8:28am    
But that's exactly what I described there :) Maybe I should have made it clearer. I'll update it, please take another look in a few minutes.
[no name] 20-Mar-15 8:38am    
Done, please take a look :)
Ajith_joseph 20-Mar-15 8:44am    
Thank you so much for the answer. Which means, I need to create a new link with the email and it should redirect to a new page where user can enter the replay message. Am I right?
[no name] 20-Mar-15 8:52am    
Exactly!
Please be so kind and mark my "solution" as accepted if I helped you :)

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