Results 1 to 5 of 5

Thread: help with e-mail sending code

  1. #1
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default help with e-mail sending code

    Picked up this peice of code from the thread at the following link :


    qt3 smtp network example adapted for qt4


    Thing is i cant get it to work. The small and simple project is attached, it is qt console, the network module has been included in the project.

    can anyone give me a hand?

    My initial output is:

    stateChanged 1
    stateChanged 2
    :then it just sits there for a very long time. When i close the console window i get the following before it closes:

    QWaitCondition: Destroyed while threads are still waiting
    Press any key to continue
    I am using MSVS .NET 2003, QT 4.2.0, WINDOWS.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: help with e-mail sending code

    have you a mail server on you window localhost?

    Qt Code:
    1. socket->connectToHost( "localhost", 25);
    To copy to clipboard, switch view to plain text mode 

    You must connect on remote host...

    from smtp provider

    or you own smtp server
    this run on smtp autefitification .... postfix or qmail ...
    https://qt-webdav.svn.sourceforge.ne..._auth_console/

  3. #3
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: help with e-mail sending code

    Thanks a lot for your response.

    I do not have a mail server. Was trying to get postfix but from what i understand postfix does not run on Windows.

    Is there something else i could use to run the code with?

    I am a novice to software.

    So feel fre to educate me a little bit here. Lets say that i don't mind using the Unix OS to run my little e-mail test. I have windows on my pc and that is what i am using now:

    Questions:

    If i install Unix, or some Unix type OS, say Linux, how does this affect my current OS; windows?

    Will i be able to switch between operating systems as i whenever i please without trouble, given that both are on the same machine?

    I am trying to build a crossplatform application that can send e-mail. So far i have just been using Mvs .NET 2003 with Qt 4.2.0 on windows xp. I f i start developing code for the e-mail section of my project on a linux OS, what does that say for my application?

    and i don't even know how i will incoorporate the e-mail section builed o linux, into the rest of my project.

  4. #4
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: help with e-mail sending code

    Quote Originally Posted by locus View Post
    Questions:
    If i install Unix, or some Unix type OS, say Linux, how does this affect my current OS; windows?
    t.
    Window life to the next virus / linux live forever.

    The advantage to having a 2° PC server linux / mac ( or only a minimac 500$, today mac is linux all in one more as 2000 application) is big ;
    1 - secure disk to save data
    2 - server to versioning your software http://subversion.tigris.org/ to save each steps.
    3 - dns server to make your own lan whitout to write ip adress
    4 - Mail server to send fast mail and imap to grab fast mail
    5 - Apache lan server to put html doc and to devolop new software
    6 - To check if your qt soft running on linux qt4 install package http://www.qtforum.de/forum/viewtopic.php?t=4044
    7 - my children play window game on linux + wine http://www.winehq.com/ and nothing crash.

    If you are linux beginner ubundu 6.10 having all listed software inside ... is not present ... open a terminal amministrator root and write apt-get install softpackagename [enter] .


    If you dont like to have two pc ubuntu make your pc dual boot..

    && If you use Mingw compiler on window .... you can more understand linux or mac.

  5. #5
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: help with e-mail sending code

    I am using a server called "best smtp server", which seems to work ok.

    and i have things running on windows.

    now when i run the code, my output is like this:

    stateChanged 1
    stateChanged 2
    stateChanged 3
    Connected
    connected
    stateChanged 6
    stateChanged 0
    disconneted
    error "Unknown error"
    and the error from the server log is:

    {04/Jul/2007 12:43:15} [3888] [Debug] 127.0.0.1:1285 Connected to us on port 25
    {04/Jul/2007 12:43:15} [3888] [Debug] 127.0.0.1:1285|25 -> 220 Welcome to ESMTP Server
    {04/Jul/2007 12:43:15} [3888] [Debug] 127.0.0.1:1285|25 -> 550-Socket error Socket Error # 10054550 Connection reset by peer. caught
    {04/Jul/2007 12:43:15} [3888] [Debug] 127.0.0.1:1285 Disconnected from us. Port: 25
    does anyone have a theory as to why this little code does not work?

    all suggestions welcomed.

    Thanks in advance for your time.

Similar Threads

  1. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  2. Sending mail using Qt
    By munna in forum Qt Programming
    Replies: 3
    Last Post: 18th December 2006, 11:17
  3. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 00:49
  4. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41
  5. qt network performance
    By criss in forum Qt Programming
    Replies: 16
    Last Post: 24th July 2006, 09:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.