EMAIL.findreplace("EMAIL_ACCOUNT" EMAIL_ACCOUNT)
EMAIL.findreplace("ENCRYPTED_PASSWORD" ENCRYPTED_PASSWORD) ARRAY(str) a ReceiveMail(EMAIL 0x100 DownLoadFolder a)
1. If System folder is read-only: right click System folder, click Folder Properties, uncheck read-only, OK.
2. Find and delete member function EMAILACCOUNT.Get.
3. Optionally make System folder read-only.
4. Import the attached file. It contains modified EMAILACCOUNT.Get. Place it anywhere.
To use non encrypted password with email functions, prepend ! to the password.
In the future, after upgrading QM, delete the imported function.
I followed the instructions, and I can not erase the ___EMAILACCOUNT.Get function.
Can I create a small application to encrypt passwords? I can not find help in this regard.
I would like too to make a little program for my users can generate their encrypted passwords and store them in the configuration INI file of my application. Thanks.
But the main problem continues. If I put an encrypted password, Sendmail and RetrieveMessages work properly.
If I put a password unencrypted to call those commands, I get the following error:
Email Server Error: some email account settings missing in Line: 11519 Iid: 5 Place: 11519 Code: 0 Source: 3 Command: foreach m p.RetrieveMessages(Flags1 0 EmailServer)...
This error occurs to me in the same way with POP server (with Retrievemessages command) as the SMTP server (with sendmail command). Actual server configuration (It works well with Encripted Password generated by Quickmacros Assistant):
I read the configuration parameters from an .ini file. I do a reading, and I concatenating the parameters.
¿Why I do not get the same result? I attach the source code.
Continuous testing with unencrypted password. The values of the other parameters are the same as those listed above. This code does not work me. Appears error: Incorrect username or password:
for i 0 17
if(rget(var_result[i] var_name[i] "EMAIL SERVER" INIFilename))
err ...
else
if var_result[i]
TextLog=F"INI File Error. The value or the Key: {var_name[i]}, Section: [EMAIL SERVER] File: {INIFilename} does not exist"
out TextLog
mes TextLog NameApp
end
before SendMail, and see all correct values, then I have no ideas why it does not work. Unless using a very old Quick Macros version that still did not support !password.
Try this:
Log in to your yahoo email account, go to
Help (Setting) -> Account Info -> Account Security -> Allow apps that use less secure sign in
and turn it on.
and log out
and re-test it.
The configuration to read emails from Yahoo less safely was already enabled, thank you.
Initially I installed version 2.4.3.8 Quickmacros. Then, seeing that it was not compatible with Windows 2000, installed version 2.4.2.2 above. I realized that I did not properly compiled to run the application that was developing, and I returned to install version 2.4.3.8 above.
Now I uninstalled completely with the uninstaller, delete the folder QuickMacros 2 "Program Files (x86)" directory, and I re-install it.
After checking with "out EmailServer", that admiration (!) Appears in front of the password, and I try again, continues to fail, both as executable directly from the shell.
How I could confirm whether I am using the correct version of the file? Can it affect the content of directory user documents\My QM? This directory is not removed it.
The application works correctly without admiration (!) and with password encripted from "QM Email Settings" Window.
I also solves the problem if know the passphrase encription used in that window (in "To String" button)... or to change this passphrase from within the application as a parameter...
#ret //C# code
using System;
using System.Net;
using System.Net.Mail;
public class Email
{
static public void Send(string password,string email,string subject,string body)
{
var fromAddress = new MailAddress("xxx@gmail.com","From Name");
var toAddress = new MailAddress(email);
var smtp = new SmtpClient
{ ;;;;Host = "smtp.gmail.com", ;;;;Port = 587, ;;;;EnableSsl = true, ;;;;DeliveryMethod = SmtpDeliveryMethod.Network, ;;;;UseDefaultCredentials = false, ;;;;Credentials = new NetworkCredential(fromAddress.Address, password)
};
using (var message = new MailMessage(fromAddress, toAddress)
{ ;;;;Subject = subject, ;;;;Body = body
})
{ ;;;;smtp.Send(message);
}
}
}
But this will not work on Windows 2000. Also on XP without .NET.
#ret
//C# code
using System;
using System.Net;
using System.Net.Mail;
public class Email
{
static public void Send(string password, string email, string subject, string body)
{
var fromAddress = new MailAddress("emailaccount@yahoo.es", "Email Account Name");
var toAddress = new MailAddress(email);
var smtp = new SmtpClient
{
Host = "smtp.mail.yahoo.com",
Port = 465,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(fromAddress.Address, password)
};
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = subject,
Body = body
})
{
smtp.Send(message);
}
}
}
---------
ERROR:
Error (RT) in <open ":3047: /0">Sendmail C code: 0x80131500,
Error al enviar correo.
en System.Net.Mail.SmtpClient.Send(MailMessage message)
en Email.Send(String password, String email, String subject, String body).
I am delighted with Quickmacros because I had removed complexity for development. I find it incomprehensible that there are no libraries for reading emails in many tools. In fact, when I bought Quickmacros went looking for this functionality. I'm a frustrated developer, because I can not find tools powerful, easy to use development, and a good debugger. I'll have to leave Quickmacros, at least for this project. I am an excellent analyst, but a bad programmer source code :-(
I appreciate your interest, but I will not keep trying this way. I can send emails with many utilities, but I can not read with any who knows. Please, let's leave it, and thank you very much.
;This macro uses ImapX .NET library. Download it from http://imapx.codeplex.com/ and extract ImapX.dll to QM folder.
out
;get password from registry HKEY_CURRENT_USER\SOFTWARE\GinDi\QM2\User\p str password;if(!rget(password "gmail""\p"))end"failed"
;download messages from gmail account Inbox folder ARRAY(str) a=CsFunc("""me@gmail.com" password "ALL"0) ;info: ;Replace 0 to 1 to mark the messages as seen. ;Replace "ALL" to "UNSEEN" to get only unseen messages. ;All search filters: https://tools.ietf.org/html/rfc3501#section-6.4.4 ;The function does not delete messages on the server. You can modify it to delete or move to another folder from Inbox. Also you can modify it to get messages from another folder etc. ;ImapX has only some basic documentation: http://imapx.codeplex.com/documentation
;parse and display messages out a.len int i for i 0 a.len ,MailBee.Message m._create ,m.RawBody=a[i] ,str from(m.FromAddr) subject(m.Subject) body ,body=iif(m.BodyFormat=1 m.GetPlainFromHtml(m.BodyText) m.BodyText) ,outF"<><Z 0x80E080>{from} {subject}</Z>[]{body}" ,
#ret //C# code
using System;
using System.Collections.Generic;
using ImapX;
public class Email
{ ,public static string[] Receive(string user,string password,string filter="ALL", bool markSeen=false) ,{ ,,using(var client = new ImapClient("imap.googlemail.com", true)) { ,,,//client.Port=993; client.UseSsl=true; //default ,,,if(!client.Connect()) { Out("failed to connect"); return null; } ,,,if(!client.Login(user, password)) { Out("failed to login"); return null; } ,,,var folder = client.Folders.Inbox; ,,,List<string> a = new List<string>(); ,,,foreach(var m in folder.Search(filter, ImapX.Enums.MessageFetchMode.Tiny)) { ,,,,//Out(m.From); ,,,,if(markSeen) m.Seen = true; ,,,,//a.Add(m.ToEml()); ,,,,a.Add(m.DownloadRawMessage()); ,,,} ,,,return a.ToArray(); ,,} ,} , ,static void Out(object s) { Console.WriteLine(s); }
}