Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send email from a different computer in a executable file
#1
Hello,


In my computer I have the e-mail account configured and I can send e-mails. But if i try to execute the executable into another computer does not work because we don't have the account configured I guess.

How to create an executable to send e-mail from a different computer that doesn't have quickmacros installed? Is it possible.

BR
Alex
#2
When creating macro, in dialog "Send email message" select the account (not <Default>) and check Variable. The dialog will transfer account settings from registry to the macro.
#3
My mailbox for the following settings, debugging error occurred, I would like to ask where the wrong settings, I hope to be able to point it out, thank you


Attached Files Image(s)
       
#4
Now change the port settings, prompted the following error, I did not find the option of TLS, I hope to be able to point it out, thank you
-------------------------------------------------------------

Error (RT) in <open ":1: /0">Macro1: [Error: Negative or void server response] (0x7A)
Server response: 530 5.7.0 Must issue a STARTTLS command first
#5
Check
Secure connection (SSL)

For example, gmail uses TLS, and my settings are:
SMTP port 465, checked secure connection. Server smtp.gmail.com, method LOGIN.
POP3 port 995, also checked. Server pop.gmail.com.
#6
This is now set, still can not succeed, port 25 changed to the 587 also tried


Attached Files Image(s)
   
#7
Try
Encrypting password for email
#8
Thank you very much, I use Microsoft's outlook mailbox, the successful delivery of mail (code as follows), but the password is clear, how to encrypt the display?

The use of QM built-in send mail method, has not been successful, I hope to further improve

Smile

Macro Macro2
Code:
Copy      Help
CsFunc("" "password" "kyjdp@foxmail.com" "Subject" "Body")

#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("kyjdp@outlook.com", "From Name");
var toAddress = new MailAddress(email);

var smtp = new SmtpClient
{
;;;;Host = "smtp-mail.outlook.com",
;;;;Port = 25,
;;;;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);
}
}
}
#9
In your last screenshot i see auth method = no. Probably should be LOGIN. Try it, if works, will not need more code to encrypt password.
#10
Macro Macro2728
Code:
Copy      Help
str CSharpCode=
;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("xxxxxxxxxxxxxxxxxx@outlook.com", "From Name");
;var toAddress = new MailAddress(email);
;
;var smtp = new SmtpClient
;{
;;;;;Host = "smtp-mail.outlook.com",
;;;;;Port = 25,
;;;;;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);
;}
;}
;}
CsFunc(CSharpCode "password" "xxxxxxxxxxxxxxxxxx@foxmail.com" "Subject" "Body")

Now you can encrypt the macro. In Options -> Security.

Here i changed email addresses, to avoid more spam.
#11
I was too stupid, actually forgot to set method, set to LOGIN, the perfect send mail, thank you very much for reminding me
Big Grin
#12
I use the following code to send e-mail messages, in the case of network instability, the link will be prompted to failure, how to set up in the case of failure to send, re send the message? Until the successful transmission, stop sending

Macro Macro1
Trigger SF9     Help - how to add the trigger to the macro
Code:
Copy      Help
SendMail "*******@foxmail.com" "test" "text" 0 "" "" "" "" "" "*****@outlook.com"
#13
Macro Macro2754
Code:
Copy      Help
;send
SendMail ...
err 30; goto send
#14
Thank you very much for the perfect email!
Delays and errors are unavoidable,Suggestions can be made as follows:

1.SMTP by default, select LOGIN
2.Add check box: error and retry

The following picture shows:


Attached Files Image(s)
   
#15
Gintaras Wrote:When creating macro, in dialog "Send email message" select the account (not <Default>) and check Variable. The dialog will transfer account settings from registry to the macro.

When I check the variable it takes the double commas from the email accout

Code:
Copy      Help
SendMail "email@blablabla.com" "teste" "<b>teste</b>" 1 "" "" "" "" "" af

And then I get this error

Error in <open ":1: /75">Macro1: unknown identifier.

How should I declare the variable af?
#16
It may happen if in the SMTP dialog is selected <Default> and in Accounts dialog ("QM email settings") none of the accounts is set as default (it may happen after a Windows upgrade or if you never set a default account or deleted it). In the SMTP dialog select some real account (not <Default>) in the combo box. Or set default account.


Forum Jump:


Users browsing this thread: 1 Guest(s)