Click here to Skip to main content
15,917,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPlease I need Ur help in asp problem Pin
Diya'a15-May-09 21:23
Diya'a15-May-09 21:23 
AnswerRe: Please I need Ur help in asp problem Pin
Diya'a17-May-09 21:59
Diya'a17-May-09 21:59 
QuestionAssigning value to session in javascript Pin
Indrajeet Sutar15-May-09 20:26
Indrajeet Sutar15-May-09 20:26 
AnswerRe: Assigning value to session in javascript Pin
Manas Bhardwaj16-May-09 5:59
professionalManas Bhardwaj16-May-09 5:59 
Questionhow to apply css on file uploader Pin
Jagz W15-May-09 19:13
professionalJagz W15-May-09 19:13 
AnswerRe: how to apply css on file uploader Pin
N a v a n e e t h15-May-09 20:14
N a v a n e e t h15-May-09 20:14 
QuestionHaving problem recognizing the value property of htmlcheckbox Pin
CrazyCoder2615-May-09 19:01
CrazyCoder2615-May-09 19:01 
QuestionCann't send email and attachment thru asp.net 2003 using smptserver="localhost" [modified] Pin
micydon15-May-09 15:59
micydon15-May-09 15:59 
Hi
My requirement is i have an application form which has entries like name,dob,qualification,exp and upload resume(file field). when somebody fill this form, upload his resume and press submit ,i want these details and resume to get in my yahoomails inbox. but when i try this with local host it doesn't work i hve given the ip address in default smptservers relay button. i am using asp.net 2003 can anybody pls help me why i am not getting this correctly.Below i am giving the code i hve used


Imports System
Imports System.Data.OleDb
Imports System.web
Imports System.IO
Imports System.Web.Mail
Imports System.Web.SessionState
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Function FncSubmit()

Dim szSQL As String
Dim objdr As OleDbDataReader
Dim icnt As Integer
Dim sapplnno As String
Dim szFileBiodata As String
Dim szfile As String
Dim iapplnno As Integer
Dim attach1 As String



Dim objEmail As New MailMessage

objEmail.To = "abc@yahoo.co.in"
objEmail.From = txtEmail.Text
objEmail.Subject = txtName.Text & "," & txtQualif.Text & ", " & txtExp.Text
objEmail.Body = "hi"

If Not file1.PostedFile Is Nothing Then

Dim attFile As HttpPostedFile = file1.PostedFile
Dim attachFileLength As Integer = attFile.ContentLength
If attachFileLength > 0 Then

szfile = Path.GetFileName(file1.PostedFile.FileName)

file1.PostedFile.SaveAs(Server.MapPath(szfile))

Dim attach As MailAttachment = New MailAttachment(Server.MapPath(szfile)) ' Attach the Newly created email attachment */
attach1 = szfile
objEmail.Attachments.Add(attach)

End If
End If

objEmail.Priority = MailPriority.High
SmtpMail.SmtpServer ="localhost"
Try
SmtpMail.Send(objEmail)
'MessageBox.Show("Your feedback has been submitted.")


MessageBox.Show("Your application is submitted")


Catch exc As Exception
MessageBox.Show("Failed to submit your feedback: ")
'MessageBox.Show(exc.ToString())
Response.Write(exc.ToString())

End Try


If attach1 <> "" Then
File.Delete(Server.MapPath(attach1))


End If

anybody pls help me this is urgent
thanks in advance
with regards
anitha

modified on Friday, May 15, 2009 11:25 PM

AnswerRe: Cann't send email and attachment thru asp.net 2003 using smptserver="localhost" Pin
Ramesh Swaminathan15-May-09 16:41
Ramesh Swaminathan15-May-09 16:41 
GeneralRe: Cann't send email and attachment thru asp.net 2003 using smptserver="localhost" Pin
micydon15-May-09 17:28
micydon15-May-09 17:28 
GeneralRe: Cann't send email and attachment thru asp.net 2003 using smptserver="localhost" Pin
keyur satyadev15-May-09 19:14
keyur satyadev15-May-09 19:14 
QuestionGrid view Pin
hahii15-May-09 15:09
hahii15-May-09 15:09 
AnswerRe: Grid view Pin
Ramesh Swaminathan15-May-09 16:54
Ramesh Swaminathan15-May-09 16:54 
AnswerRe: Grid view Pin
padmanabhan N21-May-09 1:24
padmanabhan N21-May-09 1:24 
QuestionIP in Text Box Pin
sjmclean15-May-09 13:09
sjmclean15-May-09 13:09 
AnswerRe: IP in Text Box Pin
keyur satyadev15-May-09 19:21
keyur satyadev15-May-09 19:21 
GeneralRe: IP in Text Box Pin
sjmclean15-May-09 23:27
sjmclean15-May-09 23:27 
GeneralRe: IP in Text Box Pin
keyur satyadev15-May-09 23:39
keyur satyadev15-May-09 23:39 
AnswerRe: IP in Text Box Pin
Manas Bhardwaj16-May-09 6:08
professionalManas Bhardwaj16-May-09 6:08 
Questionget value from popup window Pin
Mohammed Elkholy15-May-09 10:53
Mohammed Elkholy15-May-09 10:53 
AnswerRe: get value from popup window Pin
Jeff Circeo16-May-09 3:19
Jeff Circeo16-May-09 3:19 
QuestionGrrrrr Pin
JoelD31115-May-09 10:50
JoelD31115-May-09 10:50 
AnswerRe: Grrrrr Pin
keyur satyadev15-May-09 19:25
keyur satyadev15-May-09 19:25 
QuestionDataBinding Pin
hahii15-May-09 7:25
hahii15-May-09 7:25 
QuestionASP.NET as a platform for webbrowser based online game Pin
yarns15-May-09 6:27
yarns15-May-09 6:27 

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.