Send a Email
-
Hello
I want to make a windows application which can send an Email.
But I do not know how I can do.
If I search the internet I find something like the QTcpSocket but how does that work.
Can someone help my?Regards,
wim -
Did you try "this":http://lmgtfy.com/?q=qt+smtp ?
-
yes of course.
-
[quote author="Andre" date="1333098465"]Did you try "this":http://lmgtfy.com/?q=qt+smtp ?[/quote]
Wow, I didn't know this service... :-)
-
[quote author="wimschuiteman" date="1333098697"]yes of course.[/quote]
So, what did you try already? Did you find any SMTP class that seemed to be of use? What part of the task are you strugling with in particular?
-
I use Qt creator 2.4.1.
I want to make a QT Gui Application, which sends an e-mail when I click a button.
I try "this":http://www.qtcentre.org/threads/2221-Sending-email-using-Qt
I have the code put in a new class.And in my MainWindow
@void MainWindow::on_bttnSendMail_clicked()
{
Smtp *newMail = new Smtp("from@address.com","to@address.com"," Your Subject","My body text");
delete newMail;
}@But then i get te following errors:
Object::connect: No such signal QTcpSocket::error(SocketError) in ..\MailSend\smtp.cpp:9
Object::connect: No such signal QTcpSocket::stateChanged( SocketState) in ..\MailSend\smtp.cpp:10
Object::connect: No such signal QTcpSocket::disconnectedFromHost() in ..\MailSend\smtp.cpp:11 -
I moved the posting above from "this topic":http://qt-project.org/forums/viewthread/15909/ to here, as it was not relevant to the other discussion.
-
I think i'm one step forward.
The project build and run without error.But he send not a Email.
This is my Qdebug output:
@
Signals created
stateChanged: QAbstractSocket::HostLookupState
stateChanged: QAbstractSocket::ConnectingState
stateChanged: QAbstractSocket::ConnectedState
connected @He doesn't go in het readyRead state.
Does anyone know what might that be? -
Well, it could be that there is not ReadyRead state. See QAbstractSocket::SocketState for the list of states. readyRead is a signal that is provided by [[doc:QIODevice]] (a baseclass of QTcpSocket), but it does not correspond to a socket state. It only indicates that bytesAvailable() is going to return >0.
-
In the last days i'm tried http://qt-apps.org/content/show.php/Class+for+sending+mail?content=140925 Works well but can be improved using a correct Rfc2822.
-
-
[quote author="felipe.c.sousa" date="1333468700"]http://qt-project.org/forums/viewthread/15913/#80578 i use that. [/quote]
Could you be more explicit on what that is? I doubt every one in this topic speaks Portugese... (I certainly don't.)
-
do you do the download ? in there he make a connection wich the server and use a function at Qt for the e-mail.
-
[quote author="Andre" date="1333526158"]
[quote author="felipe.c.sousa" date="1333468700"]http://qt-project.org/forums/viewthread/15913/#80578 i use that. [/quote]Could you be more explicit on what that is? I doubt every one in this topic speaks Portugese...[/quote]
look this: http://zip.net/bfgq7B