Hello all, so latest ive been trying to use the inmoov to send email, i think i almost got it perfectly working, just need a bit of tuning now. Next stop will be put him also reading the email
1- the pythin script that he will load, this is optimized to gmail, change port for others
def emailtest(to,TEXT,SUBJECT):
import smtplib
message = 'Subject: %s\n\n%s' % (SUBJECT, TEXT)
mail = smtplib.SMTP('smtp.gmail.com',587)
mail.ehlo()
mail.starttls()
mail.login('youremail','your pass')
mail.sendmail('your email',to,message)
mail.close()
2-you need to put in set the following file that i named contact.txt, ofcourse this is an exemple of names
John
Pedro
Pedro2
Maria
3-you have to put on the map the contact2email.txt
Pedro2:pedrogilsenarego@gmail.com
Maria:mariazinho@hotmail.com
4- finnaly the aiml!
<?xml version="1.0" encoding="UTF-8"?>
<aiml>
<!--EMAIL -->
<!--EMAIL-EXIST? -->
<category><pattern>WHAT IS THE EMAIL OF <set>contact</set></pattern>
<template><map><name>contact2email</name><star/></map></template>
</category>
<!--EMAIL-START -->
<category><pattern>SEND EMAIL</pattern><template><think><set name="topic">send email</set></think>What is the subject of the email?</template></category>
<!--<category><pattern>FOOBAR *</set></pattern><template>You don't have that contact should i add it?</template></category>-->
<topic name="send email">
<!--EMAIL-SUBJECT -->
<category><pattern>_</pattern><that>WHAT IS THE SUBJECT OF THE EMAIL</that><template><think><set name="emailsub"><star/></set></think> What is the content?</template></category>
<!--EMAIL-CONTENT -->
<category><pattern>_</pattern><that>WHAT IS THE CONTENT</that><template><think><set name="emailcontent"><star/></set></think>For whom you wish to send the email?</template></category>
<!--EMAIL-TO -->
<category><pattern><set>contact</set></pattern><that>FOR WHOM YOU WISH TO SEND THE EMAIL</that><template>Email sent.<oob><mrl><service>python</service><method>exec</method>
<param>emailtest("<map><name>contact2email</name><star/></map>","<get name="emailcontent"/>","<get name="emailsub"/>")</param></mrl></oob></template></category>
</topic>
</aiml>
now he will send emails, what is still a problem is that he sometimesdont recognize some names (im using ALICE2) which gets priority, for the subject and content is not a problem since i used "_" instead of "*" to prioritize, but in the names i didnt found yet how to do it, also the webkitrecognizer have sometime problems recognize the names (specially portuguese ones...)
Ah i deleted all the contactation.aiml from alice since was just priorituzing shit over my send email!
cya