Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 7th, 2007, 9:17 PM   #1
NightShade01
Programmer
 
Join Date: Oct 2005
Posts: 52
Rep Power: 4 NightShade01 is on a distinguished road
Mailing Program

Hey everyone I just had a quick question. I just finished writing a very very simple mail client (litterally all it does is send msg's). I was wondering, sometimes when I send mail it goes really quick and appears almost instantly on the receiving server however sometimes it sends quickly and takes longer (about 45 secs) to appear on the server. I'm not complaining about the time it's not important just curious as to why it might do that. Any thoughts?

-Test it with different sized email which doesn't seem to have any impact on it.
NightShade01 is offline   Reply With Quote
Old Jul 8th, 2007, 2:53 AM   #2
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,120
Rep Power: 5 lectricpharaoh will become famous soon enough
Many things can account for this, including network conditions (takes the mail longer to arrive), server load (takes the server longer to process it), mail content (some servers may apply filters and/or virus scanning of attachments, either of which may slow processing), and any number of other things.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Jul 8th, 2007, 11:18 AM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I agree with lectricpharaoh. There are a lot of moving parts involved in this process and any one of them could cause a delay.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jul 8th, 2007, 12:42 PM   #4
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 210
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Yeh, it's all pretty much been said. Please can you upload the source? I'd be really, really interested to see it as I've wanted to include mail in one of my programs! I'd give you credit for the small bit that I'd use it for and if it sweeps the nation like I'm hoping it would - we'd both be famous!
mattireland is offline   Reply With Quote
Old Jul 8th, 2007, 1:16 PM   #5
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
mattireland, why dont you just read the documentation of the System.Net.Mail namespace and get the satisfaction of doing it yourself?
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Old Jul 8th, 2007, 1:20 PM   #6
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 210
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Right, now I know the namespace I will. That's all I really wanted. Thanks!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jul 8th, 2007, 2:10 PM   #7
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 210
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Hey guys! Sorry to invade this thread but why isn't this working?

    Dim sendto = "matt@mattireland.co.uk"

    Private Sub Send1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send1.Click
        'create the mail message
        Dim mail As New Net.Mail.MailMessage()

        'set the addresses
        mail.From = New Net.Mail.MailAddress("program@program.com")
        mail.To.Add("matt@mattireland.co.uk")

        'set the content
        mail.Subject = "testing"
        mail.Body = "testing program"

        'send the message
        Dim smtp As New Net.Mail.SmtpClient("127.0.0.1")
        smtp.Send(mail)
        MsgBox("The message has been sent to: " & sendto)



    End Sub

I get an unhandled exception error and it says that the sending has failed. Thanks!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jul 8th, 2007, 5:14 PM   #8
PhilBon
Hobbyist Programmer
 
PhilBon's Avatar
 
Join Date: Nov 2005
Posts: 172
Rep Power: 4 PhilBon is on a distinguished road
Send a message via AIM to PhilBon Send a message via MSN to PhilBon
is your mail server on? As well as does it need authentication? Are you sure you have everything you need?
PhilBon is offline   Reply With Quote
Old Jul 8th, 2007, 5:45 PM   #9
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
Yeah as PhilBon has just said, you would need to send mail through a mail server - if you dont have your own set-up you would generally send them via your mail provider's server.

Also, alot of servers wont just receive mail from anyone and again as PhilBon mentioned, you generally need to use an Ssl connection.
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Old Jul 8th, 2007, 6:19 PM   #10
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 210
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
How do I set up the mail server? Sorry I'm a bit of a noob at this mail stuff still.

Thanks!
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Language display in program Prm753 C++ 3 May 30th, 2006 6:45 PM
Help me program this with Watcom! DBZ Other Programming Languages 3 Feb 26th, 2006 10:41 PM
Creating a program to test a program sixstringartist C 8 Jan 21st, 2006 2:15 PM
move program console window back badbasser98 C++ 21 Oct 18th, 2005 3:02 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 5:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC