hello
actually i have done one application in which while click the submit button the form data will be transfer to a given mail id,i am using smtp server, but problem is while submitting the form the data will be transfer to a file in C:\Inetpub\mailroot\Queue folder and not to given mail id, please any one tell me what is the problem or any setting is there .
i am sending my code . please chk it
thanks
regards
sadab alam
Loading
Tanmay SarkarPosted Aug 6, 2010, 9:13 AM
& where it use,
SmtpServer.Credentials = new System.Net.NetworkCredential(logOnName, password);
Change it as
SmtpServer.Credentials = new System.Net.NetworkCredential(fromAddress, password);
When I checking your code I see that your loginname & fromaddress is not same, then I crashed to see that I upload older file.
Ok that's not matter, if you write same name on that it will work & i test it,better to delete because why you pass sem parameter twice. :)
Now it will work to you!
Thank you!
If you wish you may mark it as an answer.
sayed shadabPosted Aug 6, 2010, 12:57 AM
Hear i am sending my project file(i used u r code hear)and from main() function i called the function passing required argument, plz chk the code and plz correct it.
thanks
Tanmay SarkarPosted Aug 5, 2010, 1:40 PM
Thank you!
sayed shadabPosted Aug 5, 2010, 1:44 AM
Can you please send me your complete project file(Mail).I think this will help me.Actually i am new to it.
Thanks
sadab
Tanmay SarkarPosted Aug 4, 2010, 8:51 AM
Remember, if you put password in your project then remove it when uploading.
Thank you!
Tanmay SarkarPosted Aug 4, 2010, 8:38 AM
SmtpServer.Credentials = new System.Net.NetworkCredential(logOnName, password);
on your code. complete action I provided, please slowly read the code you should under stand that ....
Thank you!
sayed shadabPosted Aug 4, 2010, 8:30 AM
can u please tell me what is the Credentials login name and password and where i configure it.
Tanmay SarkarPosted Aug 4, 2010, 8:16 AM
1. you are using from address from yahoo.com and write there smtp as 25,
may be yahoo use it for paying customer for it, i am not sure, i read it from an article
test again from gmail smtp 587 which is free & working. :)
2. what's it "36.212.176.83"?
your IP address? it is change every time when you are connecting to internet.
3. Where is Credentials means you can't send login name and password so how it possible?
Use that code which I uploaded, that's work fine in my knowledge.
Because I already build it.
the limitation is your from address must be gmail account.
Thank you! Best of luck....
If you get trouble don't hesitate no one is perfect , so asked again.....
Thank you! :)
sayed shadabPosted Aug 4, 2010, 7:59 AM
Hear i am sending my code, please have look.waiting your reply.
thanks
sadab
Tanmay SarkarPosted Aug 4, 2010, 7:46 AM
Thank you!
sayed shadabPosted Aug 4, 2010, 4:03 AM
Yes i had changed my code as per u r code , but still not working the mail was stored in C:\Inetpub\mailroot\Queue folder and transfer to given mail id( i.e mail.From = new MailAddress([email protected])
plz tell me what to do
thanks
sadab
Tanmay SarkarPosted Aug 3, 2010, 7:55 AM
And check where is the difference between this & your code.
Check it.
Thank you!
Please mark it as an answer if it help you!
sayed shadabPosted Aug 3, 2010, 5:31 AM
and using SmtpClient object (smtpClient)
i just send the message using below code
smtpClient.Send(mailMsg);
thanks
sadab
Tanmay SarkarPosted Aug 3, 2010, 5:21 AM
I hope you can send this from a valid mail id to destination (obliviously valid) mail id.
You may use gmail (not necessary) for your work.
If i have a mistake to understand your question then please explain what is problem in real.
Thank you! :)