Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > Visual Web Developer 2008
|
Visual Web Developer 2008 Discuss creating ASP.NET 3.5 sites with Microsoft's Visual Web Developer 2008. If your question is more specific to a piece of code than the Visual tool, see the ASP.NET 3.5 forums instead. If your question is specific to the "Express Edition" be sure to state that in your post.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2008 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2009, 06:04 AM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

sir,do not get irritated over my questions you may think my questions are looking silly of course it might be just i do not want to use built in features right now.... i want to use it where ever and when ever needed that's it...i have put my intentions before you....
 
Old December 16th, 2009, 06:15 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't get irritated. I am just saying that I can't help you if you don't help me help you. That's all....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; December 16th, 2009 at 11:33 AM..
The Following User Says Thank You to Imar For This Useful Post:
kirangentlebreeze1987 (December 16th, 2009)
 
Old December 16th, 2009, 06:19 AM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

ok sir i am going to code now if i get stuck anywhere i will contact you through this forums.....
 
Old December 16th, 2009, 10:53 AM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Text;
using System.Collections.Generic;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
MembershipUser newuser = Membership.GetUser(CreateUserWizard1.UserName);
Guid newuserid = (Guid)newuser.ProviderUserKey;
SqlConnection con = new SqlConnection("Data Source=KIRAN\\SQLEXPRESS;Initial Catalog=kiran;Integrated Security=True");
con.Open();
string querystring;
querystring = "insert into reg(username,password,email,securityquestion,secur ityanswer,userid)values(@username,@password,@email ,@securityquestion,@securityanswer,@userid)";
SqlCommand cmd = new SqlCommand(querystring, con);
SqlParameter uname = new SqlParameter("@UserName", SqlDbType.NVarChar, 50);
uname.Value = CreateUserWizard1.UserName;
cmd.Parameters.Add(uname);
SqlParameter pass = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
pass.Value = CreateUserWizard1.Password;
cmd.Parameters.Add(pass);
SqlParameter ema = new SqlParameter("@Email", SqlDbType.NVarChar, 50);
ema.Value = CreateUserWizard1.Email;
cmd.Parameters.Add(ema);
SqlParameter secques = new SqlParameter("@securityanswer", SqlDbType.NVarChar, 50);
secques.Value = CreateUserWizard1.Question;
cmd.Parameters.Add(secques);
SqlParameter secans = new SqlParameter("@securityquestion", SqlDbType.NVarChar, 50);
secans.Value = CreateUserWizard1.Answer;
cmd.Parameters.Add(secans);
SqlParameter uid = new SqlParameter("@userid", SqlDbType.NVarChar, 50);
uid.Value = newuserid.ToString();
cmd.Parameters.Add(uid);
cmd.ExecuteNonQuery();
con.Close();
kiransendmail obj = new kiransendmail();
obj.SendMail(CreateUserWizard1.UserName, CreateUserWizard1.Password, CreateUserWizard1.Email);
}
public class kiransendmail
{
System.Net.Mail.SmtpClient smtpConnection;
public kiransendmail()
{

smtpConnection = new System.Net.Mail.SmtpClient();
smtpConnection.Host = "mail.usermail.net";//Your mail server's ip or name.
smtpConnection.Port = 25;//The port
smtpConnection.Credentials = new System.Net.NetworkCredential("username", "password");//Username and password to access mail server
}
public void SendMail(string Username, string password, string email)
{
string mailbody = String.Format("This is your account details. Username: {0}, Password: {1}", Username, password);
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(email);
message.Subject = "Your account details";
message.From = new System.Net.Mail.MailAddress("[email protected]");//Give your from e mail address here
message.Body = mailbody;
smtpConnection.Send(message);
}

}
}
when i try to run this it it raises an error""Error in processing. The server response was: http://www.spamhaus.org/query/bl?ip=117.204.52.154"} System.Exception {System.Net.Mail.SmtpException}
"
 
Old December 16th, 2009, 11:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What part of the pages you get when you follow the link in the Exception message would you like me to clarify for you?

Quote:
Outbound Email Policy of The Spamhaus Project for this IP range:

This IP range has been identified by Spamhaus as not meeting our policy for IPs permitted to deliver unauthenticated 'direct-to-mx' email to PBL users
or
Quote:
ATTENTION: At the time of detection, this IP was infected with, or NATting for a computer infected with a high volume spam sending trojan - it is participating or facilitating a botnet sending spam or spreading virus/spam trojans.
or
Quote:
Removal Procedure

If you are not using normal email software but instead are running a mail server and you are the owner of a Static IP address in the range 117.204.0.0/15 and you have a legitimate reason for operating a mail server on this IP, you can automatically remove (suppress) your static IP address from the PBL database.
Or anything else you find here http://cbl.abuseat.org/lookup.cgi?ip=117.204.52.154 or here: http://www.spamhaus.org/pbl/query/PBL281930

Looks like you got black listed somehow. Read the page the error is linking to and try to get your IP removed from the black lists.

BTW: You do realize you're creating users twice, don't you? One in the table reg and one in the standard Membership database.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 16th, 2009, 11:18 AM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

i dont get any......it simply raises an expection...i deployed my application using iis...i configured it correctly...i dono why it raises an exception
 
Old December 16th, 2009, 11:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What do you think happens when you send an e-mail from your local machine to another account? It needs to go through other servers. One of those servers is rejecting your message.

Did you see the question about duplicate user accounts?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 16th, 2009, 11:24 AM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

sorry sir i could not get this done....i am stuck....help me..i want to send email using iis smtp server to another account.....
 
Old December 16th, 2009, 11:31 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I can't help you with that. Apparently, your IP is blacklisted so you'll need to follow the pages linked to in the error message and get in touch with the people that blacklisted you. I didn't build the Internet and I didn't blacklist you so I can't undo this for you.

I find it hard to communicate with you. You're not really answering my questions which makes this conversation boring and tiring. I'll step out of it for now. Good luck with getting unlisted. Be sure to communicate better with the people who blacklisted you than you did here, or you'll be listed for ever ;-)

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 16th, 2009, 07:56 PM
Authorized User
 
Join Date: Dec 2009
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kirangentlebreeze1987
Default email

this time i got this error "mailbox unavailable"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Conformation of email varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 8th, 2009 07:35 AM
Edit User Profile - email garydarling BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 September 29th, 2006 06:58 AM
Conformation Screen. rupen Classic ASP Basics 3 July 12th, 2005 11:31 PM
how do i create email alis system in asp kale_tushar Classic ASP Basics 3 March 22nd, 2004 11:33 AM
how to create an email id through php script manu_mcs Pro PHP 0 December 8th, 2003 03:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.