Using Command prompt commands
Hi friends,
I want to use Command prompt commands in Qt.....Actually i'm trying to send mail via Qt...But it doesn't worked,so i have gone for some other solutions,at that time,i have found that we can send mail from command prompt and it worked too..Now i want to use that command prompt commands in Qt..It should not call Command prompt...Please any one help me.
Re: Using Command prompt commands
You can use QProcess to get your commands executed.
Code:
arguments << "CreateDirectory";
myProcess->start(program, arguments);
CHEERS
Re: Using Command prompt commands
Thanks Mr.karankumar....I'm using like this command prompt "ssmtp mohanakannan.kannan8@gmail.com <recepient1.txt"....recepient1.txt is having "from address" and "to address"...ssmtp only sends mail,i have installed it.Could you please tell me how to use it in Qt(those command prompt commands)..actually i dont have any idea....
Re: Using Command prompt commands
According to you...
ssmtp mohanakannan.kannan8@gmail.com <recepient1.txt this is your command
so the code will be something like.
Code:
arguments << "mohanakannan.kannan8@gmail.com";
arguments << "<recepient1.txt";
myProcess->start(program, arguments);
CHEERS
Re: Using Command prompt commands
This will not work as "<" is interpreted by a shell which is not present here.
Re: Using Command prompt commands
Thank you Mr.karankumar and Mr.Wyotsa..I will try it and will tell the result..
Re: Using Command prompt commands
Thanks ,
How to add the configuration file in Qt.....Actually during sending mail via command prompt,It works by means of a configure file (ssmp.conf)..It only has lot of details about AuthUser, Authpass, EnableTLS.....how to add these at all...Thats why i'm asking how to add Config file in Qt.....Thanks in advance
Re: Using Command prompt commands
This is a forum devoted to Qt, not ssmp. If you have problems with the latter, don't ask here, we have no experience with using this software.
Re: Using Command prompt commands
sorry Mr.Wyotso,It is not ssmp,its "ssmtp.conf"....Its a file,i want to use that file "ssmtp.conf" in Qt...
Re: Using Command prompt commands
Quote:
Originally Posted by
mohanakannan
sorry Mr.Wyotso,It is not ssmp,its "ssmtp.conf"....
Whatever...
Quote:
Its a file,i want to use that file "ssmtp.conf" in Qt...
Re: Using Command prompt commands
Thank you very much Mr.Wysoto.....Thinking that,it will work..........Any doubts,i will ask you:)
Added after 1 49 minutes:
Hi Mr.Wyotso, I've tried your code and its working....Working in the sense,using qDebug( ),i have shown all the lines in that file.....I have told earlier that i have send the mail in command prompt using "ssmtp"...It is the only reason for sending mail...By using this command(ssmtp recipient_mail@gmail.com),it is possible....I have installed that ssmtp.....It is only having that ( ssmtp.conf ) file..Thats why i've asked how to use it. But now my problem is How to use those command ssmtp recipient_mail@gmail.com in this Qt,by that we can send mail in Qt......Thanks for your response..