I know how to send email from a server if the “To” is known like just,
public class SentEmail : System.Web.Services.WebService
{
[WebMethod]
public string Sending_Email(string strEmailAddrFrom,
string[] strEmailAddrTo, int intTotalEmailTo, string strAttachement)
{
EmailAlert NewMail = new EmailAlert();
return NewMail.EmailSent(strEmailAddrFrom,
strEmailAddrTo, intTotalEmailTo, strAttachement);
}
}
But the problem is how to read all the incoming emails(probably from gmail) continuously at the server(where web service is written),
and detect the sender ex: abc@xyz.com… and reply to him.
This is some sort of autoreply but need to reply for detected sender
It sounds like you need a service to poll your email box. You could use something like http://sourceforge.net/projects/hpop/ to communicate with gmail’s POP3 servers.