Results 1 to 8 of 8
  1. #1
    EvoSpider's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    /
    Posts
    706
    Reputation
    9
    Thanks
    34

    NEED HELP CODING EMAIL SENDER!!!

    Could someone please find out the problem..

    smtpServer.Send()

    That times out and it never sends the email...
    PLEASE HELP

    CODE:
    [highlight=vb.net]
    Imports System.Net.Mail
    Public Class Form1

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

    Dim smtpServer As New SmtpClient()
    Dim mail As New MailMessage()
    smtpServer.Credentials = New Net.NetworkCredential(" *******@gmail.com", "******")
    smtpServer.Port = 587
    smtpServer.Host = "smtp.gmail.com"
    smtpServer.EnableSsl = True
    mail = New MailMessage()
    mail.From = New MailAddress("**********@gmail.com")
    mail.To.Add("**********@gmail.com")
    mail.Subject = "Test"
    mail.Body = "Test"
    smtpServer.Send()

    End Sub
    [/highlight]
    Last edited by Jason; 06-08-2011 at 11:57 PM. Reason: Code tags are lubbly.


  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    [highlight=vb.net] Dim client As New SmtpClient()
    Dim sendTo As New MailAddress("emailhere")
    Dim from As MailAddress = New MailAddress("emailhere")
    Dim message As New MailMessage(from, sendTo)

    message.IsBodyHtml = True
    message.Subject = "blah subject"
    message.Body = "blah body"
    Dim basicAuthenticationInfo As New System.Net.NetworkCredential("emailhere", "passwordhere")

    client.Host = "smtp.gmail.com"
    client.UseDefaultCredentials = False
    client.Credentials = basicAuthenticationInfo
    client.Port = 587
    client.EnableSsl = True
    client.Send(message)
    [/highlight]
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. #3
    Stephen's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Engine.exe
    Posts
    4,689
    Reputation
    184
    Thanks
    1,149
    My Mood
    Aggressive
    Phisher.

  4. #4
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    smtpServer.Send(mail) // SEND WHAT? YOUR MESSAGE (MAIL)

    smtpServer.Send(mail) // Must tell to the computer what to send

  5. #5
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    Quote Originally Posted by Stephen View Post
    Phisher.
    That's exactly what I was thinking.

  6. #6
    SubCub's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Clarion, Pa
    Posts
    695
    Reputation
    -32
    Thanks
    120
    My Mood
    Cheerful
    Quote Originally Posted by Cookie. View Post


    That's exactly what I was thinking.
    yea it is... no one just makes a random emailer...

  7. #7
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127
    smtp.send() takes a parameter: the message (in this case 'mail')

  8. #8
    SubCub's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Clarion, Pa
    Posts
    695
    Reputation
    -32
    Thanks
    120
    My Mood
    Cheerful
    Quote Originally Posted by kibbles18 View Post
    smtp.send() takes a parameter: the message (in this case 'mail')
    nuub friendly.