Click here to Skip to main content
15,891,667 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i used SMTP server to send emails.i used creatuserwizard in asp to create a registration form .
This is aspx file.

XML
<asp:CreateUserWizard ID="userwizard" ContinueDestinationPageUrl="~/secretfiles/secret.aspx" runat="server" >
  <MailDefinition BodyFileName="register.txt" Subject="Registration Confirmation" From="amrit.enest@gmail.com" />
  </asp:CreateUserWizard>



This is my web.config file.

XML
<mailSettings>
    <smtp deliveryMethod="SpecifiedPickupDirectory" from="amrit.enest@gmail.com">
    <specifiedPickupDirectory pickupDirectoryLocation="C:\Users\eNest-25\Desktop\emails"/>
    </smtp>
    </mailSettings>


The .eml files are being generate in pickup-directory location with the information about email but user yet didn't receive it not it is being shown in sent mails of sender's email id.
Why?

I didn't provide password of email which is being used to send emails anywhere.i doubt how can smtp can send mails without knowing the password of sending email

Please help
Posted

1 solution

You have specified the deliveryMethod to be SpecifiedPickupDirectory this makes it not send the mail actually. Instead it saves on your hard disc in the folder you mentioned. Set it to network and it will send the email. You also need to setup the password and the username along with port number and host.

For more details on sending mail, check out the MSDN article, here[^].
 
Share this answer
 

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