View Full Version : help with e-mail sending code
locus
30th June 2007, 22:59
Picked up this peice of code from the thread at the following link :
qt3 smtp network example adapted for qt4 (http://www.qtcentre.org/forum/f-qt-programming-2/t-sending-email-using-qt-2221.html)
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.
patrik08
1st July 2007, 13:49
have you a mail server on you window localhost?
socket->connectToHost( "localhost", 25);
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.net/svnroot/qt-webdav/sendmail_smtp_auth_console/
locus
1st July 2007, 18:25
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.
patrik08
1st July 2007, 19:27
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.
locus
4th July 2007, 18:07
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.