Results 1 to 37 of 37

Thread: Invisible Mail

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27

    Post Invisible Mail

    Hi all,

    Dose anyone have code for sending Invisible Mail?

    Also can anyone tell me what SMTP is and how to get it?

    Python

  2. #2
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    To SMTP:

    SMTP is the simple mail transfer protocol. You use it to send e-mails over a server.

    It is like a question & answer game, you ask the server and he answers you.

    So, first you connect with a winsock control:

    Winsock1.RemoteHost = post.server.com 'Use the servers address you want to use
    Winsock1.LocalPort = 25 'SMTP uses port 25
    Winsock1.Protocol = 0 'Use TCP/IP
    Winsock1.Connect

    Then you get a string from the server, my server says:
    220 post.webmailer.de ESMTP Sendmail 8.9.3/8.8.7; Sun, 20 May 2001 21:51:57 +0200 (MET DST)

    You answer:
    HELO floppes 'means, "hello, I am floppes"

    Server:
    250 post.webmailer.de Hello p3EE225CF.dip.t-dialin.net [62.226.37.207], pleased to meet you

    You:
    MAIL FROM:<[email protected]> 'The sender of the mail

    Server:
    250 <[email protected]>... Sender ok

    You:
    RCPT TO:<[email protected]> 'The recipient of the mail

    Server:
    250 <[email protected]>... Recipient ok

    You:
    DATA 'Start the mail contents

    Server:
    354 Enter mail, end with "." on a line by itself

    You:
    From: "Me" <[email protected]> 'For E-Mail clients to display the name
    To: "You" <[email protected]>
    Subject: Blabla
    Content-Type: text/plain; charset="iso-8859-1"
    MIME-Version: 1.0
    X-Mailer: VB Mailer

    Text

    .

    Server:
    250 VAA11195 Message accepted for delivery

    You:
    QUIT

    Server:
    221 post.webmailer.de closing connection


    Ok, maybe that is for the beginnng quite much. More information you will find in the RFC 821 http://sunsite.dk/RFC/rfc/rfc821.html.

    I made a small program that sends a mail via smtp, if you want, I can send it you. The hard thing was to find out, how to get the server responses and answer correct.

    I hope I could help, and sorry for my english!

    If you have any additional questions to SMTP, post them!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27

    Thumbs up Thanks friend

    Hi,

    I didn't understand quite a bit of what you said so, I will be more spicific about what I want, by the way, your English is quite good, no need to be sorry.

    My email acount is [email protected]
    I want someone to send email to me. he is with Yahoo or Hotmail,
    what should I put in the SMPT box. Is the STMP essential?

    If I put the code you have kindly send, will it do the job?

    I will be glad to receive your program if you don't mind.

    Thanks a lot

    Python

  4. #4
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Unfortunately still won't be invisible as your ip address is always passed on. So the trick is how to disguise your IP address. Anyone know how?

  5. #5
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Send through a firewall?

  6. #6
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    Ok, so for sending from any account to a Yahoo account:

    On your form you need this:
    - TextBox Name = Text1, Multiline = True
    - CommandButton Name = Command1, Caption = Send
    - Winsock Name = Winsock1, Protocol = 0, LocalPort = 25, RemotePort = 25, RemoteHost = smtp.mail.yahoo.com

    Code:
    Dim CRLF As String 'You have to end every command with a carrige return
    Dim inBuffer As String 'Stores the incoming messages from the server
    Dim outBuffer As String 'Stores your messages
    
    Dim cid As Integer 'Command ID, stores the current state of the transaction
    
    Private Function Status(text$)
    Text1.text = Text1.text & text$ & CRLF
    End Function
    
    Private Sub Form_Load()
    CRLF = Chr(13) & Chr(10)
    End Sub
    
    Private Sub Command1_Click()
    Text1.text = ""
    Winsock1.Close
    
    cid = 1
    Winsock1.Connect
    End Sub
    
    Private Sub Winsock1_Connect()
    Status ("Connected!")
    End Sub
    
    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Winsock1.GetData inBuffer
    Select Case cid
    Case 0
        Status ("*Confirmation")
        Status (inBuffer)
        Winsock1.SendData "QUIT" & CRLF
        cid = 10
    Case 10
        Status ("*Confirmation")
        Status (inBuffer)
        cid = 11
    Case 1
        outBuffer = "HELO Python" & CRLF
        
        If Left(inBuffer, 3) = "220" Then
            Status ("*Connected")
            Status (inBuffer)
            Status ("#Say hello")
            Status (outBuffer)
            
            inBuffer = ""
            Winsock1.SendData outBuffer
            cid = 2
        Else
            cid = 0
        End If
    Case 2
        outBuffer = "MAIL FROM:<[email protected]>" & CRLF
        
        If Left(inBuffer, 3) = "250" Then
            Status ("*Confirmation")
            Status (inBuffer)
            Status ("#Sender")
            Status (outBuffer)
            
            inBuffer = ""
            Winsock1.SendData outBuffer
            cid = 3
        Else
            cid = 0
        End If
    Case 3
        outBuffer = "RCPT TO:<[email protected]>" & CRLF
        
        If Left(inBuffer, 3) = "250" Then
            Status ("*Confirmation")
            Status (inBuffer)
            Status ("#Recipient")
            Status (outBuffer)
        
            inBuffer = ""
            Winsock1.SendData outBuffer
            cid = 4
        Else
            cid = 0
        End If
    Case 4
        outBuffer = "DATA" & CRLF
        
        If Left(inBuffer, 3) = "250" Then
            Status ("*Confirmation")
            Status (inBuffer)
            Status ("#Start sending mail")
            Status (outBuffer)
        
            inBuffer = ""
            Winsock1.SendData outBuffer
            cid = 5
        Else
            cid = 0
        End If
    Case 5
        outBuffer = "From: " & Chr(34) & "Name of sender" & Chr(34) & " <[email protected]>" & CRLF
        outBuffer = outBuffer & "To: " & Chr(34) & "Python" & Chr(34) & " <[email protected]>" & CRLF
        outBuffer = outBuffer & "Subject: Blabla" & CRLF
        outBuffer = outBuffer & "Content-Type: text/plain; charset=" & Chr(34) & "iso-8859-1" & Chr(34) & CRLF
        outBuffer = outBuffer & "MIME-Version: 1.0" & CRLF
        outBuffer = outBuffer & "X-Mailer: Script Soft Mailer" & CRLF
        
        outBuffer = outBuffer & "" & CRLF 'First line has to be empty
        outBuffer = outBuffer & "Text line 1" & CRLF
        outBuffer = outBuffer & "Text line 2" & CRLF
        outBuffer = outBuffer & "..." & CRLF
    
    
        
        If Left(inBuffer, 3) = "354" Then
            Status ("*Startsignal")
            Status (inBuffer)
            Status ("#Text")
            Status (outBuffer)
        
            inBuffer = ""
            Winsock1.SendData outBuffer
            Winsock1.SendData CRLF & "." & CRLF 'Sign to end mail
            cid = 6
        Else
            cid = 0
        End If
    Case 6
        outBuffer = "QUIT" & CRLF
        
        If Left(inBuffer, 3) = "250" Then
            Status ("*Confirmation")
            Status (inBuffer)
            Status ("#Close connection")
            Status (outBuffer)
        
            inBuffer = ""
            Winsock1.SendData outBuffer
            cid = 7
        Else
            cid = 0
        End If
    Case 7
        Status ("*Confirmation")
        Status (inBuffer)
        
        If Left(inBuffer, 3) = "221" Then
            Winsock1.Close
        End If
    End Select
    
    If cid = 0 Then
        Winsock1.SendData "RSET" & CRLF
        Status ("!Error! Reset has been sent!")
        Status (inBuffer)
    End If
    I have also uploaded the project, so everone can download it.

    It only works if you send from a Yahoo account to an other. This is against spamming. But there are quite a lot of severs that allow you to send a mail from any address to any address. This is often used for anonymous mails (but they aren't really) and for mail bombing .
    Attached Files Attached Files

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27

    Thumbs up

    Hi All,

    Thank floppes for the code, I will try it.

    I love to know how to disguise My IP address but for the time being, it's not important. My friend knows less from computer programming than I do. By the way I am not behind a firewall

    Regards
    Last edited by Python; May 21st, 2001 at 06:32 AM.

    Python

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27
    My dear floppes, Thanks for taking care of my problem.

    I got your mail but, when I run your code, I get the following error, Could you please tell me what to do and what's wrong?

    !Error! Reset has been sent!
    521 Mail not accepted from this domain

    Thanks again

    Python

  9. #9
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    Can you post the whole protocol?

    I think this happens if the recipient's e-mail is not a Yahoo address and you try to send the mail over the Yahoo server.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27
    My dear floppes
    I PMd you an address which I call It NAME here

    I used your sample and got:

    Verbunden!
    *Connected
    220 smtp018.mail.yahoo.com ESMTP

    #Say hello
    HELO Python

    *Confirmation
    250 smtp018.mail.yahoo.com

    #Sender
    MAIL FROM:<[email protected]>

    !Error! Reset has been sent!
    521 Mail not accepted from this domain

    and when I changed [email protected] to [email protected] I got:

    Verbunden!
    *Connected
    220 smtp018.mail.yahoo.com ESMTP

    #Say hello
    HELO Python

    *Confirmation
    250 smtp018.mail.yahoo.com

    #Sender
    MAIL FROM:<[email protected]>

    !Error! Reset has been sent!
    521 yahoo.com closing transmission channel. You must be pop-authenticated before you can use this smtp server, and you must use your yahoo mail address for the Sender/From field.

    Please Help

    Yours,

    Python

  11. #11
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    All right, I know why it doesn't work:

    If you use [email protected] it's clear:
    You can only send mails over the Yahoo server if you have a Yahoo address.

    If you use [email protected]:
    Yahoo has an anti-spamming mechanism. Before you can send your mail, you have to check your E-Mail with your Yahoo account. Because the SMTP protocol doesn't use a password, Yahoo verifies your IP. The POP3 protocol to check your mail uses a password, and Yahoo saves your IP for a some minutes (I don't know how much, something between 30 - 120 min.). If you send a mail after you have checked your mails, Yahoo knows that you have logged on with your password with your current IP and allows you to send mails over POP3.

    Some before you send mails, first check mails.

    There is a password function in the SMTP protocol, but I didn't find out how to use it. This is very new and not every mail-client supports it.

    Greetings form Germany!

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27
    Dear floppes,

    You are so helpful.
    I send you an email. Please read it

    Kind regards

    Python

  13. #13
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    If you want to be able to send an email to anybody on any host, you only have to send it to the smtp server of the recipient's host!

    This is usualy not the same smtp server that is used by users of this host to send emails.

    So, how do you know at which server you must send the message?

    You extract the domain name from the email ([email protected] -> hotmail.com)
    and then you look up the MX register in the DNS and it will tell you the server name.

    For exemple, for yahoo I got mx2.mail.yahoo.com
    So I can send an email to [email protected] using this address without logging in before (that normal because how would a server send an email to yahoo otherwise?).

    I'm just wondering why softwares like Outlook or Eudora don't have the option to send the message directly to the recipient's server instead of sending it to the user's server, which will then transmit it to the recipient's server...

    Krushstone

  14. #14
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    Krushstone - OR Anyone

    1) How would I go about looking up the "MX register in the DNS"?
    2) Could this look-up be automated so the app does the look-up not the user?
    3) Are there any SMTP servers that will accept any e-mail address?
    4) Where can I find these?
    5) How would I route the "e-mail" through a proxy server?

    I would like to add an e-mail function to one of my VB apps, but I don't have much info on what's the best way to do it. I read another post by Aaron Young....where he used MAPI....I think the user would need Outlook installed to use this method....not sure.

    What would be the best method for sending "e-mail" with a VB app....Anyone?

  15. #15
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    1.
    I have an OCX for that.

    use it this way:
    server=mx1.server("yahoo.com")

    it will extract your primary DNS server from the registery and use it to retrieve the info.

    I'm not the original author of this software.
    I took it there
    http://plaza.v-wave.com/jmartin/programs.htm and I put it in an OCX for easy access.

    I've found some dll or ocx that do the same job, but unlike this one they were not free

    2.
    sure
    just extract the domain name from the email and get the server address.

    3.
    I'm not sure... because of spamming, they probably won't accept email from someone that is not a user of the server if the recipient of the email is located on another host.

    4. Good question

    5. I don't know. Someone else can surely answer that.

    To send an email, you can modify the code above posted by floppes, and use the OCX to know to which server you must send it.

    it's a way to do that, but I'm not sure this is the *best* way.

    Krushstone

  16. #16
    Lively Member floppes's Avatar
    Join Date
    May 2001
    Location
    Darmstadt, Germany
    Posts
    99
    The tip with the OCX is good!

    I know that there are servers that accept any e-mail address, so you can use them for mailbombs or anonymous mails .

    But I don't know the addresses...

  17. #17
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    floppes -

    Any idea on how to direct Winsock thru a proxy server?
    I probably need to use a SOCKS proxy (port:1080) for this.

  18. #18

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    27
    Dear Krushstone
    I tried [email protected] with no luck. I don't know where I went wrong. Your (mx2.mail.yahoo.com) help a lot. Could you please tell me the Hotmail's also?
    And Could you help to send attachments?

    Regards:

    Python

  19. #19
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    Ok

    If you try
    address = mx1.server("hotmail.com")
    you will know the address to send the email to hotmail, it will look like
    mc1.law5.hotmail.com

    You can't connect to mx2.mail.yahoo.com to send an email to hotmail. You need to connect to the place where you want to send the email.
    In this case it is hotmail.

    To know any other addresses, juste download MXcontrol.zip that I attached to a previous message and use the OCX to know them.
    address = mx1.server("addresstoknow.com")



    For the attachements, I suggest you to take a look there
    http://www.vbsquare.com/articles/sendmail/
    they explain how to send an attachment via SMTP.

    If you have any other problem, just tell me and I will try to help you.

    Krushstone

  20. #20
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Krushstone,

    Using the app here:
    http://plaza.v-wave.com/jmartin/programs.htm

    If I want to find out the smtp server name I enter start.com.au for the domain name, what do I enter for the DNS server to use?

    Also your ocx failed on my system NT4, it gave a subscript out of range error.
    Last edited by Nucleus; May 30th, 2001 at 03:09 AM.

  21. #21
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    Normally, for the DNS, it will the combo box will be filled during the app is loading.


    BUT, if you get an error with the OCX, I think that the OCX can't extract your DNS from your registry.
    It works fine for me on win2k, and I think this works with 95/98 too.

    The DNS server is the DNS server of your ISP where your computer connect to resolve domain name.

    In a command prompt in NT4, type
    ipconfig /all
    you should get 2 dns server(not tested on NT4, only on 2K).

    Now that you know these addresses, you could modify the code to use one or the other instead of letting the program extracting it from the registry.

    If you want, I can modify the OCX so you can pass the DNS as an argument, so it won't read the registry.

    I think that the best would be that the ocx detects if the OS is NT4 and to extract the DNS in an other way so it doesn't crash.

    I'll check this out this evening because for the moment I don't have access to a NT4 machine.

    Krushstone

  22. #22
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530

    Thumbs up

    Nice Krushstone. Works well, thankyou. Now do you know how I can get both DNS numbers from my nt machine using VB?

  23. #23
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Nucleus
    Your image in your signature isn't showing up...
    is it stored on your HD or the net?
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  24. #24
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Wayne,

    Is that right, it looks fine on my pc.

    In that case I'll remove it.
    Last edited by Nucleus; May 30th, 2001 at 09:37 AM.

  25. #25
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Yup
    ...and there it was..Gone!
    ..if you want to use a pic you have to store it on some site and then reference it...Yahoo...Pictures is a good easy local.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  26. #26
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    Ok, I tried it on NT4 but it seems to work. I can extract the DNS from the registry, so it wasn't what I thought...

    It's hard to tell where the problem is...

    Krushstone

  27. #27
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Krush, where in the registry are the DNS entries?

  28. #28
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    somewhere around there
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

    this is the DhcpNameServer

  29. #29
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Thumbs up Mail Server Look Up Tool

    You can use the following site to look up mail servers for specific domains. Lots of other stuff available on the page as well. Here it is http://packetderm.cotse.com/cgi-bin/lookuptools

    Hope this helps.

    Laterz
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  30. #30
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Krushstone,

    I can find this:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip

    but not the Parameters key

    This would explain why your ocx fails on my machine NT4 server.

  31. #31
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Krushstone,

    Thanks for the help so far, I nearly have it working.

    Now that I have the mailserver from the mx lookup, you said I send directly to the mailserver

    So how do I go about sending a mail directly to this server, any code would be appreciated?

  32. #32
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    Yep, the code is already here

    floppes gave an example in this thread of sending an email to a smtp server.
    You will only have to modify it to fit your needs.

    Recipient = "[email protected]"
    winsock1.RemoteHost = mx1.server("recipienthost.com")
    etc.

    It shouldn't be too difficult but I can still help if needed.

  33. #33
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    I finally got it working *whew*, thankyou for helping Krushstone . I agree with you, why doesn't outlook have this sort of functionality built into it?

    One last question, the reason I could not send was that I was using the wrong server address. I used the MX lookup exe as your ocx did not work on my machine.

    Now when I ran start.com.au though, the results were:
    [Preference = 20] mail1.start.com.au
    [Preference = 20] mail2.start.com.au
    [Preference = 10] maild.startcorp.com
    Best MX record to send through : maild.startcorp.com

    I tried maild.startcorp.com but it failed (hence my post to you). However, both mail1.start.com.au and mail2.start.com.au worked as SMTP hosts.

    Now if mail1.start.com.au is a mailserver, what is maild.startcorp.com, and why does the exe recommend using it?

    Also have you got that ocx working for NT yet?

  34. #34
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    Can you give the error that you had by trying maild.startcorp.com?

    If I knew someone on this host I could try to send him a email.

    I tried the OCX on NT4. It extracted the good DNS from the registry.
    I didn't have the full access on it, and it wasn't connected to the Internet so I wasn't able to test the resolving of MX record.

    Also, I'm getting an error on Win95.
    When it will be corrected i'll post a new version of the OCX

  35. #35
    Lively Member
    Join Date
    Nov 2000
    Location
    Québec City
    Posts
    73
    ok, here it is.

    It has been tested on Win95 and on Win2K. If it doesn't work on your computer, please tell me the OS version that you're using and I'll try to correct it.

    In most of the cases, if it doesn't work it's because it can't extract the DNS from the registry.
    So I'd need to know where to go in the registry on this OS to extract the DNS.

    There are 2 ways to use the OCX

    1. server = MX1.server(name as string)

    It will try to extract the DNS from the registry, so maybe it won't work.

    2. server = MX1.ServerWithDNS(name as string, dns as string)

    The DNS server is an argument. This will be useful if it can't be extracted correctly with the first function. But you need to know the DNS, which can be found with

    winipfg on a win9X machine
    ipconfig /all on a NT machine (2K included)


    Comments and suggestions are appreciated.

    Krushstone

  36. #36
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Krushstone,

    The error was "unable to resolve host".

    I retried it again this morning, and it actually works now.

    My guess is that maild.startcorp.com redirects to either mail1.start.com.au or mail2.start.com.au, meaning that if one of the mailservers goes down (say mail1.start.com.au) then the mail is redirected to mail2.start.com.au.

    Perhaps there was a technical hitch with maild.startcorp.com at the time I was testing (the mail system has benn playing up recently). Just goes to show that the achillies heel of that system is that if maild.startcorp.com goes down, then mail trying to go through it, doesn't make it to either mail server .

  37. #37
    New Member
    Join Date
    Oct 2006
    Location
    INDONESIA
    Posts
    4

    Re: Invisible Mail

    How Can I Get Dns.ocx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width