Applicxation form
-
I make an application form it fill data into access database and send email notification, it work good but no emails I received can you please help //the code
Imports System.Data.OleDb
Imports System.Web.MailPublic Class newsletter1
Inherits System.Web.UI.Page#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer. <system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent() End Sub Protected WithEvents btn\_submit As System.Web.UI.WebControls.Button Protected WithEvents Label1 As System.Web.UI.WebControls.Label Protected WithEvents Image1 As System.Web.UI.WebControls.Image Protected WithEvents chk\_atico As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_howard As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_fakhreldin As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_vinaigrate As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_trattoria As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_nai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_wild As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_amigo As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_bistro As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_renchai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_taboula As System.Web.UI.WebControls.CheckBox 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page\_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub
#End Region
Private Sub Page\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub btn\_submit\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn\_submit.Click Dim intid As Integer Dim atico As Integer Dim amigo As Integer Dim bistro As Integer Dim fakh As Integer Dim howard As Integer Dim nai As Integer Dim chai As Integer Di
-
I make an application form it fill data into access database and send email notification, it work good but no emails I received can you please help //the code
Imports System.Data.OleDb
Imports System.Web.MailPublic Class newsletter1
Inherits System.Web.UI.Page#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer. <system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent() End Sub Protected WithEvents btn\_submit As System.Web.UI.WebControls.Button Protected WithEvents Label1 As System.Web.UI.WebControls.Label Protected WithEvents Image1 As System.Web.UI.WebControls.Image Protected WithEvents chk\_atico As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_howard As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_fakhreldin As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_vinaigrate As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_trattoria As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_nai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_wild As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_amigo As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_bistro As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_renchai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_taboula As System.Web.UI.WebControls.CheckBox 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page\_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub
#End Region
Private Sub Page\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub btn\_submit\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn\_submit.Click Dim intid As Integer Dim atico As Integer Dim amigo As Integer Dim bistro As Integer Dim fakh As Integer Dim howard As Integer Dim nai As Integer Dim chai As Integer Di
Hi, Please set the 2 parameters before sending SMTP MailMessage : message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25"); SmtpMail.SmtpServer = "Server name"; //please specify your mail server name Again, check the anti virus setting for the smtp mails. Regards, Milind
-
I make an application form it fill data into access database and send email notification, it work good but no emails I received can you please help //the code
Imports System.Data.OleDb
Imports System.Web.MailPublic Class newsletter1
Inherits System.Web.UI.Page#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer. <system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent() End Sub Protected WithEvents btn\_submit As System.Web.UI.WebControls.Button Protected WithEvents Label1 As System.Web.UI.WebControls.Label Protected WithEvents Image1 As System.Web.UI.WebControls.Image Protected WithEvents chk\_atico As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_howard As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_fakhreldin As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_vinaigrate As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_trattoria As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_nai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_wild As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_amigo As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_bistro As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_renchai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_taboula As System.Web.UI.WebControls.CheckBox 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page\_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub
#End Region
Private Sub Page\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub btn\_submit\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn\_submit.Click Dim intid As Integer Dim atico As Integer Dim amigo As Integer Dim bistro As Integer Dim fakh As Integer Dim howard As Integer Dim nai As Integer Dim chai As Integer Di
Bataineh wrote:
I make an application form it fill data into access database and send email notification, it work good but no emails I received can you please help
So, you need to put that part of code which is not working and you think relevant, rather than putting all those line.
Bataineh wrote:
mymail.SmtpServer = "localhost"
Are you sure localhost is your SMTP server IP ? and if yes , then is it configure properly? Make sure !! :)
cheers, Abhijit CodeProject MVP
-
I make an application form it fill data into access database and send email notification, it work good but no emails I received can you please help //the code
Imports System.Data.OleDb
Imports System.Web.MailPublic Class newsletter1
Inherits System.Web.UI.Page#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer. <system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent() End Sub Protected WithEvents btn\_submit As System.Web.UI.WebControls.Button Protected WithEvents Label1 As System.Web.UI.WebControls.Label Protected WithEvents Image1 As System.Web.UI.WebControls.Image Protected WithEvents chk\_atico As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_howard As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_fakhreldin As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_vinaigrate As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_trattoria As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_nai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_wild As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_amigo As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_bistro As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_renchai As System.Web.UI.WebControls.CheckBox Protected WithEvents chk\_taboula As System.Web.UI.WebControls.CheckBox 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page\_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub
#End Region
Private Sub Page\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub btn\_submit\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn\_submit.Click Dim intid As Integer Dim atico As Integer Dim amigo As Integer Dim bistro As Integer Dim fakh As Integer Dim howard As Integer Dim nai As Integer Dim chai As Integer Di
I try my email but it not work do you have any idea please
Dim mymsg As New MailMessage Dim mymail As SmtpMail mymsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25"); mymail.SmtpServer = "mail.wunderman-amman.com" mymsg.From = Session("admin@wunderman-amman.com") mymsg.To = "admin@wunderman-amman.com"
'mymsg.To = "ahmad.bataineh@wunderman-me.com;a_bataineh@yahoo.com"
mymsg.Subject = "ATICO Newsletter"
mymsg.BodyFormat = MailFormat.Html
mymsg.Body = ""
mymsg.Body += "New Registration for Newsletter"
mymsg.Body += "Name :" & Session("name_atico") & "
"
mymsg.Body += "Gender :" & Session("gender_atico") & "
"
mymsg.Body += "Date of Birth :" & Session("date_atico") & "
"
mymsg.Body += "Profession :" & Session("pro_atico") & "
"
mymsg.Body += "Company Name :" & Session("company_atico") & "
"
mymsg.Body += "Position :" & Session("position_atico") & "
"
mymsg.Body += "Telephone :" & Session("tel_atico") & "
"
mymsg.Body += "Mobile :" & Session("mobile_atico") & "
"
mymsg.Body += "Email :" & Session("email_atico") & "
"
mymsg.Body += "Address :" & Session("address_atico") & "
"
mymsg.Body += ""
mymail.SmtpServer = "mail.wunderman-amman.com"
mymail.Send(mymsg)
Response.Redirect("thanks.aspx") -
I try my email but it not work do you have any idea please
Dim mymsg As New MailMessage Dim mymail As SmtpMail mymsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25"); mymail.SmtpServer = "mail.wunderman-amman.com" mymsg.From = Session("admin@wunderman-amman.com") mymsg.To = "admin@wunderman-amman.com"
'mymsg.To = "ahmad.bataineh@wunderman-me.com;a_bataineh@yahoo.com"
mymsg.Subject = "ATICO Newsletter"
mymsg.BodyFormat = MailFormat.Html
mymsg.Body = ""
mymsg.Body += "New Registration for Newsletter"
mymsg.Body += "Name :" & Session("name_atico") & "
"
mymsg.Body += "Gender :" & Session("gender_atico") & "
"
mymsg.Body += "Date of Birth :" & Session("date_atico") & "
"
mymsg.Body += "Profession :" & Session("pro_atico") & "
"
mymsg.Body += "Company Name :" & Session("company_atico") & "
"
mymsg.Body += "Position :" & Session("position_atico") & "
"
mymsg.Body += "Telephone :" & Session("tel_atico") & "
"
mymsg.Body += "Mobile :" & Session("mobile_atico") & "
"
mymsg.Body += "Email :" & Session("email_atico") & "
"
mymsg.Body += "Address :" & Session("address_atico") & "
"
mymsg.Body += ""
mymail.SmtpServer = "mail.wunderman-amman.com"
mymail.Send(mymsg)
Response.Redirect("thanks.aspx")Hi, Just Test the mail by using following code add following in directives Imports System.Web.Mail and write following code : Dim mymsg As New MailMessage() mymsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25") SmtpMail.SmtpServer = "mail.wunderman-amman.com" mymsg.From = "test@test.com" ' from email id mymsg.[To] = "test@test.com" ' to email id mymsg.Subject = "ATICO Newsletter" mymsg.BodyFormat = MailFormat.Html mymsg.Body = "test" SmtpMail.Send(mymsg) Regrads, Milind