Click here to Skip to main content
16,006,464 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralSession Pin
Burim Rama24-Jan-08 1:44
Burim Rama24-Jan-08 1:44 
GeneralRe: Session Pin
Shaik Haneef24-Jan-08 1:50
Shaik Haneef24-Jan-08 1:50 
GeneralRe: Session Pin
Burim Rama24-Jan-08 1:51
Burim Rama24-Jan-08 1:51 
GeneralRe: Session Pin
Shaik Haneef24-Jan-08 1:51
Shaik Haneef24-Jan-08 1:51 
GeneralRe: Session Pin
bokuceres24-Jan-08 22:25
bokuceres24-Jan-08 22:25 
QuestionHow to export mail messenger list from gmail, hotmail,yahoo? Pin
hmx_51824-Jan-08 1:33
hmx_51824-Jan-08 1:33 
GeneralMicrosoft.VisualBasic.Devices Name space Pin
Lijo Rajan24-Jan-08 1:21
Lijo Rajan24-Jan-08 1:21 
GeneralMail Sending probs Pin
Member 387988124-Jan-08 1:06
Member 387988124-Jan-08 1:06 
Hi from my local host i can able to send mail to my mailid,
So i copy that ddl in to my server and send mail to my mailid using my website,
Its sending only mail its not sending that attachment file,
,
Whats the probs i cant find it,
Same time the mail sending only to my gmalid that also sending in spam,
If i send to my yahooid its not sending at all,
plz anyone help me of this probs,
This is my code:

'Here saving some datas to my table using stored procedure after that using sub procedure call that mail send
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click

If fileUpload.PostedFile.FileName <> "" Then
Dim strInsertproc As String
Dim sqlconn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
sqlconn.Open()
strInsertproc = "SubmitTravelExpMain '" & txtuserloginempid.Text & "','01/23/2008','" & _
txtuserloginprojectid.Text & "','" & txtDestination.Text & "','" & _
Mid(txtFDate.Text, 4, 3) & Mid(txtFDate.Text, 1, 3) & _
Mid(txtFDate.Text, 7, 4) & "','" & Mid(txtTDate.Text, 4, 3) & _
Mid(txtTDate.Text, 1, 3) & _
Mid(txtTDate.Text, 7, 4) & "','1213','937','" & Val(txttotal.Text) & "','" & Val(txtadv.Text) & "'"
Dim sqlcmd As New SqlCommand(strInsertproc, sqlconn)
sqlcmd.ExecuteNonQuery()
mailsend()
sqlcmd.Dispose()
sqlconn.Dispose()
lblmessage.Text = "Your Expense Statement Has Been Uploaded Successfully..."
binddata()
Else
lblmessage.Text = "Plz Attach A File..."
End If
End Sub


Sub mailsend()
Dim objMail As New MailMessage
Dim objAttach As MailAttachment
Dim objConn As SmtpMail
Dim postedFile = fileUpload.PostedFile

Try
strPath = Path.GetFullPath(postedFile.FileName)
Catch
End Try

strdate = CDate(lbldate.Text)
If Mid(strdate, 2, 1) = "/" Then strdate = "0" & strdate
If Mid(strdate, 5, 1) = "/" Then strdate = Left(strdate, 3) & "0" & Mid(strdate, 4, 6)
strdate = Mid(strdate, 4, 3) & Mid(strdate, 1, 3) & Mid(strdate, 7, 4)

objMail.From = "info@bumigrp.com"
objMail.To = "mageshkumarh@gmail.com"
objMail.Bcc = "mageshmca10@yahoo.com"
objMail.Subject = "Travel Expense Statement of " & txtuserloginempname.Text & "(" & txtuserloginprojectname.Text & ")"
objMail.Body = "Date : " & strdate & " Time - " & hh & " : " & mm & vbCrLf & "Place : " & txtuserloginprojectname.Text & vbCrLf & "Dear Sir," & _
vbCrLf & txtDestination.Text & vbCrLf & " Kind Attention - Plz refer my travel expense details." & vbCrLf & "Regards" & vbCrLf & txtuserloginempname.Text

objMail.Priority = MailPriority.Normal
Try
objAttach = New MailAttachment(strPath)
objMail.Attachments.Add(objAttach)
Catch
End Try

objConn.Send(objMail)
End Sub

Thanks & Regards,
Mageshh,
please don't forget to vote on the post

GeneralYour also specify mail server name and port no, userid and password of emailid which your send from , use following method Pin
Shaik Haneef24-Jan-08 1:30
Shaik Haneef24-Jan-08 1:30 
GeneralRe: Your also specify mail server name and port no, userid and password of emailid which your send from , use following method Pin
Member 387988127-Jan-08 20:04
Member 387988127-Jan-08 20:04 
Generalplease try this website Pin
Shaik Haneef27-Jan-08 22:23
Shaik Haneef27-Jan-08 22:23 
QuestionWant to upload image to wwwroot as thumbnail..... Pin
Member 472423424-Jan-08 0:41
Member 472423424-Jan-08 0:41 
GeneralRe: Want to upload image to wwwroot as thumbnail..... Pin
N a v a n e e t h24-Jan-08 0:52
N a v a n e e t h24-Jan-08 0:52 
GeneralRe: Want to upload image to wwwroot as thumbnail..... Pin
Vasudevan Deepak Kumar24-Jan-08 4:11
Vasudevan Deepak Kumar24-Jan-08 4:11 
GeneralRe: Want to upload image to wwwroot as thumbnail..... Pin
N a v a n e e t h24-Jan-08 7:49
N a v a n e e t h24-Jan-08 7:49 
QuestionWhat are the benefits of using IEnumerator over other Loops?? Pin
Suryanairg24-Jan-08 0:36
Suryanairg24-Jan-08 0:36 
AnswerRe: What are the benefits of using IEnumerator over other Loops?? Pin
N a v a n e e t h24-Jan-08 0:49
N a v a n e e t h24-Jan-08 0:49 
GeneralControl IN ASP.Net [modified] Pin
kibromg24-Jan-08 0:32
kibromg24-Jan-08 0:32 
GeneralRe: Control IN ASP.Net Pin
Shaik Haneef24-Jan-08 1:45
Shaik Haneef24-Jan-08 1:45 
GeneralRe: Control IN ASP.Net Pin
kibromg24-Jan-08 1:56
kibromg24-Jan-08 1:56 
GeneralRe: Control IN ASP.Net Pin
Shaik Haneef26-Jan-08 0:13
Shaik Haneef26-Jan-08 0:13 
Generalgridview + asp.net + c# Pin
ritu432124-Jan-08 0:14
ritu432124-Jan-08 0:14 
GeneralRe: gridview + asp.net + c# Pin
Shaik Haneef24-Jan-08 1:40
Shaik Haneef24-Jan-08 1:40 
Generalfile upload event Pin
Member 387988123-Jan-08 23:01
Member 387988123-Jan-08 23:01 
GeneralRe: file upload event Pin
Paddy Boyd23-Jan-08 23:05
Paddy Boyd23-Jan-08 23:05 

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.