Page 1 of 1

nuSendMail()

Posted: Thu May 17, 2018 5:36 pm
by ahernandez
Hi,

I'm playing with this function.
I have completed the setup form with these parameters...

User Name: my gmail email address
Password: my password
Host: smtp.gmail.com
Address: my gmail address
From Name: My name
Port: 465
use SSL: Yes
Use Authentication: Yes

In a form AS section I have typed this..

$to = "myname@mydomain.es";
$from = "myname@gmail.com";
$fromname = "Administrator";
$content = "MessageContentBody";
$subject = "SubjectText";
$filename = "";
$filesource = "";
$html = false;


$sm = nuSendEmail($to, $from, $fromname, $content, $subject, array($filename => $filesource), $html);
nuDebug($sm);


and... nuDebug says..

[0] : Array
(
[0] =>
[1] => Message sent successfully
)


But it doesn't send the email...

Could you please help me?

Thanks in advance...

Before this, I have tried with my own postfix server as well.. and I haven't got good results...

Re: nuSendMail()

Posted: Thu May 17, 2018 5:41 pm
by ahernandez
Excuse me!

It is working with gmail!

But I have two more problems to solve...

Get it working on my postfix server and what I have to say to this function to send attached files

thanks!

Re: nuSendMail()

Posted: Fri May 18, 2018 7:16 am
by toms
Hi,

- Are the files to be attached stored on your server?
- Are they always different files or the same?

nuBuilder uses PHPMailer. You may want to check out their examples or ask a question there

Re: nuSendMail()

Posted: Fri May 18, 2018 8:42 am
by ahernandez
They are on my server (I've mounted an NFS directory pointing to my file server) and always are different files.

Re: nuSendMail()

Posted: Fri May 18, 2018 8:48 am
by toms
ahernandez wrote:They are on my server (I've mounted an NFS directory pointing to my file server) and always are different files.
Just assign these two variables the file name, path:

Code: Select all

$filename = "test.txt";
$filesource = "/PATHONYOURSERVER/test.txt";
Important note: nuBuilder will delete the files after sending them!

nuBuilder uses PHPMailer. You may want to check out their examples or ask a question there

Re: nuSendMail()

Posted: Fri May 18, 2018 10:29 am
by ahernandez
Great!
Thanks toms!

Re: nuSendMail()

Posted: Sat May 19, 2018 1:48 am
by admin
.