Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[4287] Sending Email With an Attachment

Last post 07-21-2008 6:28 PM by k.ashish. 21 replies.
Page 2 of 2 (22 items) < Previous 1 2
Sort Posts: Previous Next
  • 06-16-2006 11:52 AM In reply to

    Sending Email With an Attachment

    i have to develop an application that can send emails to our clients through a vb.net application...

    but da problm is dat i cant use a SMTP server... oderwise ther wudnt b ne problm @ all..!!!

    help...Sad [:(]

    • Post Points: 10
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 04-05-2007 10:14 AM In reply to

    • Opius
    • Not Ranked
    • Joined on 04-05-2007
    • Nigeria
    • New Member
    • Points 5

    Sending SMS from asp.net Webite to Mobile Phones

    I want  someone to help me with answers to sending sms to mobile phones from my website.
    • Post Points: 5
  • 01-21-2008 1:13 PM In reply to

    Re: SMTP Mail with authentication

    Can You Please send the full details

    i am little confused with the code

    i send mails with out authentication works well

    but it can goes to the spam box of the mail

    i tried this using mail sending to gmail

    How to send mails to inbox

    please help me

    thanks

    Krishna Reddy

     

    • Post Points: 10
  • 05-07-2008 3:00 AM In reply to

    • k.ashish
    • Not Ranked
    • Joined on 05-07-2008
    • India
    • New Member
    • Points 10

    Re: SMTP Mail with authentication

    to krishna reddy..

    hi krishna how r u...

    i m making an application in vb.net to send email using smtp server... but it dosnt work... even it does not send mail to spam...

    if it is possible, then plz send me the coding of ur application and the procedure... to me by my email id... this is my colg project and it didnt work, help me plz....

    plzzzzzzzzzzzzzzzzzzzzzzzzzzzz 

    thank u....

    • Post Points: 5
  • 07-16-2008 12:08 PM In reply to

    Re: [4287] Sending Email With Multipule Attachments attchement email atthement shuold be send with listbox in asp.net 2.0

     

    • Post Points: 5
  • 07-16-2008 12:21 PM In reply to

    Re: Sending Email With Multipule Attachment

    Hi

    i want to devlop  email application code with multipule attchement attchements. attchement should be with listbox.like i.e rediff style attchement so plz help me

    • Post Points: 10
  • 07-21-2008 6:28 PM In reply to

    • k.ashish
    • Not Ranked
    • Joined on 05-07-2008
    • India
    • New Member
    • Points 10

    Re: Sending Email With Multipule Attachment

    this is the vb.net coding .......

    note:- this is the coding which uses the gmail smtp server, u need to enter the valid email id and password of gmail, then only this will work...

    if u have any pblm then ask me any time...

    my id is:- k.ashish237@gmail.com 

     Imports System.Net.Mail

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim MyMailMessage As New MailMessage()

            MyMailMessage.From = New MailAddress("sender email")

            MyMailMessage.To.Add(TextBox1.Text)

            MyMailMessage.Subject = "subject title"

            MyMailMessage.Body = "enter the body text message that u want to send"
            For counter = 0 To ListBox1.Items.Count - 1
                Dim Attach As Net.Mail.Attachment = New Net.Mail.Attachment(ListBox1.Items(counter))
                MyMailMessage.Attachments.Add(Attach)
            Next

            Dim SMTPServer As New SmtpClient("smtp.gmail.com")
            SMTPServer.Port = 587
            SMTPServer.Credentials = New System.Net.NetworkCredential("yourid@gmail.com", "id password")
            SMTPServer.EnableSsl = True

            Try
                SMTPServer.Send(MyMailMessage)
                MessageBox.Show("Email Sent")
            Catch ex As SmtpException
                MessageBox.Show(ex.Message)
            End Try
        End Sub

     

    same coding with the tools of vb.net......

    hope this will help u.... 

    Imports System.Net.Mail

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim MyMailMessage As New MailMessage()

            MyMailMessage.From = New MailAddress(TextBox3.Text)

            MyMailMessage.To.Add(TextBox1.Text)

            MyMailMessage.Subject = TextBox2.Text

            MyMailMessage.Body = RichTextBox1.Text
            For counter = 0 To ListBox1.Items.Count - 1
                Dim Attach As Net.Mail.Attachment = New Net.Mail.Attachment(ListBox1.Items(counter))
                MyMailMessage.Attachments.Add(Attach)
            Next

            Dim SMTPServer As New SmtpClient("smtp.gmail.com")
            SMTPServer.Port = 587
            SMTPServer.Credentials = New System.Net.NetworkCredential(TextBox4.Text, TextBox5.Text)
            SMTPServer.EnableSsl = True

            Try
                SMTPServer.Send(MyMailMessage)
                MessageBox.Show("Email Sent")
            Catch ex As SmtpException
                MessageBox.Show(ex.Message)
            End Try
        End Sub

    • Post Points: 5
Page 2 of 2 (22 items) < Previous 1 2