Click here to Skip to main content
15,909,324 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Dynamic Form Pin
Prasanna Kumar Pete1-Nov-08 19:27
Prasanna Kumar Pete1-Nov-08 19:27 
AnswerRe: Dynamic Form Pin
RichardGrimmer5-Nov-08 2:42
RichardGrimmer5-Nov-08 2:42 
QuestionSharePoint Web Part and Office Interop problem Pin
JimmyRopes1-Nov-08 2:46
professionalJimmyRopes1-Nov-08 2:46 
QuestionWeb Services Pin
shanthi jothi1-Nov-08 2:05
shanthi jothi1-Nov-08 2:05 
AnswerRe: Web Services Pin
Sathesh Sakthivel1-Nov-08 2:07
Sathesh Sakthivel1-Nov-08 2:07 
AnswerRe: Web Services Pin
N a v a n e e t h2-Nov-08 17:03
N a v a n e e t h2-Nov-08 17:03 
AnswerRe: Web Services Pin
saanj3-Nov-08 7:27
saanj3-Nov-08 7:27 
QuestionMail sending through SMTP Pin
Satish_S1-Nov-08 0:51
Satish_S1-Nov-08 0:51 
Hi
I am sending mails to a yahoo id but mail not getting deliverd and it stays in my Queue folder in wwwroot but same mail is getting deliverd to gmail email ids. i do know why this is happening.

Following is the code

Dim mTo, mFrom, mCc, mBcc, mSubject, mMsg, mServer, mAuth As String
        Dim mPort As Integer

        mFrom = "xxxx@yahoo.com"
        mTo = "xxxx@yahoo.com"
        mCc = "xxxx@gmail.com"
        'mBcc = ""
        mServer = "192.180.0.4"
        mPort = CInt("25")
        mAuth = "LOCALHOST"
        mSubject = "asdasd"
        Dim strBody As String
        strBody = "<table cellpadding="0" cellspacing="0" bgcolor="#c1c1c1" align="center" width="100%" border="0">"
        strBody &= "<tr>"
        strBody &= "<td align="center">"
        strBody = "<table cellpadding="0" cellspacing="0" align="center" width="600" height="703" border="0">"
        strBody &= "<tr>"
        strBody &= "<td align="center"><img alt="" hspace="0" src="" cid:imageid="" align="middle" border="0" xmlns:cid="#unknown"></img></td>"
        strBody &= "</tr>"
        strBody &= "</table>"
        strBody &= "</td>"
        strBody &= "</tr>"
        strBody &= "</table>"
        mMsg = strBody

        Dim mail As New System.Net.Mail.MailMessage(mFrom, mTo, mSubject, mMsg)
        mail.IsBodyHtml = True
        mail.Priority = MailPriority.Normal



        Dim htmlView As Net.Mail.AlternateView = Net.Mail.AlternateView.CreateAlternateViewFromString(strBody, Nothing, "text/html")

        Dim imagelink As New Net.Mail.LinkedResource(Server.MapPath(".") + "\pic.jpeg", "image/jpg")

        imagelink.ContentId = "imageId"

        imagelink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64

        htmlView.LinkedResources.Add(imagelink)

        mail.AlternateViews.Add(htmlView)
        'Dim mySmtpClient As New Net.Mail.SmtpClient()

        Dim mySmtpClient As New Net.Mail.SmtpClient(mServer)


        If mAuth.ToUpper = "LOCAL" Then

            mySmtpClient.Port = mPort
            mySmtpClient.Host = mServer


            Dim configurationFile As Configuration = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath) ' or try 
            Dim mailSettings As Net.Configuration.MailSettingsSectionGroup = configurationFile.GetSectionGroup("system.net/mailSettings")
            Dim credential As New System.Net.NetworkCredential(mailSettings.Smtp.Network.UserName, mailSettings.Smtp.Network.Password)
            mySmtpClient.Credentials = credential

        ElseIf mAuth.ToUpper = "LOCALHOST" Then
            mySmtpClient.Port = mPort
            mySmtpClient.Host = "LOCALHOST"
            mySmtpClient.UseDefaultCredentials = True
        Else

            Dim basicAuthenticationInfo As New System.Net.NetworkCredential("asdasd@yahoo.com", "asdasd", "smtp.yahoo.com")
            mySmtpClient.UseDefaultCredentials = False
            mySmtpClient.Credentials = basicAuthenticationInfo
        End If

        mySmtpClient.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.PickupDirectoryFromIis

        mySmtpClient.Send(mail)

AnswerRe: Mail sending through SMTP Pin
N a v a n e e t h2-Nov-08 17:04
N a v a n e e t h2-Nov-08 17:04 
AnswerRe: Mail sending through SMTP Pin
raghvendrapanda2-Nov-08 21:21
raghvendrapanda2-Nov-08 21:21 
GeneralRe: Mail sending through SMTP Pin
Satish_S2-Nov-08 22:45
Satish_S2-Nov-08 22:45 
GeneralRe: Mail sending through SMTP Pin
Satish_S5-Nov-08 1:43
Satish_S5-Nov-08 1:43 
QuestionHow to add the web project to VS.Net 2005? Pin
Samiullah1-Nov-08 0:47
Samiullah1-Nov-08 0:47 
AnswerRe: How to add the web project to VS.Net 2005? Pin
Sathesh Sakthivel1-Nov-08 2:05
Sathesh Sakthivel1-Nov-08 2:05 
AnswerRe: How to add the web project to VS.Net 2005? Pin
saanj3-Nov-08 7:30
saanj3-Nov-08 7:30 
QuestionHow to create the solution in the VS.Net 2005? Pin
Samiullah31-Oct-08 23:23
Samiullah31-Oct-08 23:23 
AnswerRe: How to create the solution in the VS.Net 2005? Pin
Colin Angus Mackay31-Oct-08 23:27
Colin Angus Mackay31-Oct-08 23:27 
GeneralRe: How to create the solution in the VS.Net 2005? Pin
Samiullah31-Oct-08 23:46
Samiullah31-Oct-08 23:46 
GeneralRe: How to create the solution in the VS.Net 2005? Pin
Colin Angus Mackay1-Nov-08 0:56
Colin Angus Mackay1-Nov-08 0:56 
GeneralRe: How to create the solution in the VS.Net 2005? Pin
saanj3-Nov-08 7:33
saanj3-Nov-08 7:33 
GeneralRe: How to create the solution in the VS.Net 2005? Pin
Colin Angus Mackay3-Nov-08 8:00
Colin Angus Mackay3-Nov-08 8:00 
GeneralRe: How to create the solution in the VS.Net 2005? Pin
saanj3-Nov-08 16:56
saanj3-Nov-08 16:56 
QuestionStoring and Reading Images from FileServer through asp.net Pin
Mohan.M.Devarinti31-Oct-08 23:08
Mohan.M.Devarinti31-Oct-08 23:08 
Questionvirtual domain with asp.net app without using isapi_rewrite Pin
m-khansari31-Oct-08 21:17
m-khansari31-Oct-08 21:17 
AnswerRe: virtual domain with asp.net app without using isapi_rewrite Pin
m-khansari2-Nov-08 3:09
m-khansari2-Nov-08 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.