User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 332,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,097 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 3156 | Replies: 1
Reply
Join Date: Jul 2005
Posts: 1
Reputation: serag is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
serag serag is offline Offline
Newbie Poster

Strange problem in sending emails by asp.net

  #1  
Jul 9th, 2005
I use the following code to send email, and strange thing that I received the message at hotmail mail, and failed to receive it at yahoo mail, could you help me and explain what happened and how to overcome this.

Regards
Serag Farag


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msgmail As System.Web.Mail.MailMessage
Dim SmtpMail As System.Web.Mail.SmtpMail
msgmail = New System.Web.Mail.MailMessage
' SmtpMail =
msgmail.To = "elomah@yahoo.com"
msgmail.Cc = "ahmed_serageldin@hotmail.com"
msgmail.From = "ahmed_serageldin@hotmail.com"
msgmail.Subject = "subject of ggggggggggggggmsg"
msgmail.BodyFormat = System.Web.Mail.MailFormat.Html
msgmail.Body = " what u send mail ofgh ghgf ghr msgs"

SmtpMail.SmtpServer = "serag-0ivd22eow"
smtpmail.send(msgmail)
Response.Write("msg recived")
End Sub
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2005
Posts: 175
Reputation: Letscode is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 5
Letscode's Avatar
Letscode Letscode is offline Offline
Junior Poster

Re: Strange problem in sending emails by asp.net

  #2  
Jul 12th, 2005
I used this code before,It worked in both yahoo and hotmail.Thought I would share it with you.But it sends emails to the bulk mail though.

Not sure Y yours did not work.



Imports Microsoft.VisualBasic
Dim Mailmsg As New System.Web.Mail.MailMessage
Dim obj As System.Web.Mail.SmtpMail

Private Overloads Sub Send_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Send.Click
        obj.SmtpServer = "127.0.0.1"
        Mailmsg.To = "blabla@yahoo.com"
        Mailmsg.From = “Bla@yahoo.com?
        Mailmsg.Subject = “bla?
        Mailmsg.Body =?blabla?
        obj.Send(Mailmsg)
        lblmailsent.Visible = True
    End Sub





Hope it helps


Originally Posted by serag
I use the following code to send email, and strange thing that I received the message at hotmail mail, and failed to receive it at yahoo mail, could you help me and explain what happened and how to overcome this.

Regards
Serag Farag


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msgmail As System.Web.Mail.MailMessage
Dim SmtpMail As System.Web.Mail.SmtpMail
msgmail = New System.Web.Mail.MailMessage
' SmtpMail =
msgmail.To = "elomah@yahoo.com"
msgmail.Cc = "ahmed_serageldin@hotmail.com"
msgmail.From = "ahmed_serageldin@hotmail.com"
msgmail.Subject = "subject of ggggggggggggggmsg"
msgmail.BodyFormat = System.Web.Mail.MailFormat.Html
msgmail.Body = " what u send mail ofgh ghgf ghr msgs"

SmtpMail.SmtpServer = "serag-0ivd22eow"
smtpmail.send(msgmail)
Response.Write("msg recived")
End Sub
Save White Tiger
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 12:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC