-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Jeya
Message 2 in Discussion
Hi,
1) SMTP server name is
missing in your code.
2) If you
are planning to use your company SMTP server,then, please
talk to your network team and get the details.
3) Create a test account in
your outlook express and check does your SMTP server allow the mail relay.
4) For security reasons,
most the companies will block their SMTP server relay(to control the SPAM
mailing).
5) If your company is
using ex-change server then, you have to mention other setting too in your
code.
Regards
Jeya
SmtpMail.SmtpServer = "IP address"
----- Original Message -----
From:
BanupriyaVelmurugan
To: BDOTNET
Sent: Tuesday, September 07, 2004 10:33
AM
Subject: Doubt reg Sending mail through
asp.net
New Message on BDOTNET
Doubt reg
Sending mail through asp.net
Reply
Reply to Sender Recommend
Message 1 in
Discussion
From: BanupriyaVelmurugan
Hi
I have created a sqldataadapter, sqlconnection, and dataset
named dsBirthday1 in my asp.net project and added the following
code in the page_load subroutine
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
Dim
FFrom, TTo,
SSubject, BBody As String
If
Not
IsPostBack Then
SqlDataAdapter1.Fill(DsBirthday1)
If
IsNothing(DsBirthday1) Then
Response.Write("Hi")
Exit
Sub
Else
FFrom = "asdf"
Dim
dsMyRow As
DataRow = DsBirthday1.Birthday(0)
TTo = dsMyRow("Email")
SSubject = "Whish you a happy and Prosperous Birthday!
:-)"
BBody = "Hello " & dsMyRow("Name") & ", <br>
Many more happy returns of the day! <br> Long Live!
<br> By <br> Banupriya."
Try
SmtpMail.Send(FFrom, TTo, SSubject, BBody)
Response.Write("Birthday card is sent sucessfully")
Catch
ex As
Exception
Response.Write("Sorry! Error in sending the birthday
mail!")
End
Try
End
If
End
If
End
Sub
The message "Birthday card is sent
sucessfully" is displaying on execution. But I am not receiving
any mail from the project. Also it doen't raise any error when
the database contains the data for the query
select * from Birthday where
day(DOB)=day(getdate()) and
month(DOB)=month(getdate())
2. Also please say me how to find the eof or bof
condition for the dataset.
thanx for ur reply
regards
Banupriya
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]