Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuSendMail()

Questions related to using nuBuilder Forte.
Locked
ahernandez
Posts: 49
Joined: Thu May 03, 2018 12:08 pm

nuSendMail()

Unread post 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...
ahernandez
Posts: 49
Joined: Thu May 03, 2018 12:08 pm

Re: nuSendMail()

Unread post 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!
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuSendMail()

Unread post 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
Last edited by Anonymous on Fri May 18, 2018 8:43 am, edited 1 time in total.
ahernandez
Posts: 49
Joined: Thu May 03, 2018 12:08 pm

Re: nuSendMail()

Unread post by ahernandez »

They are on my server (I've mounted an NFS directory pointing to my file server) and always are different files.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuSendMail()

Unread post 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
ahernandez
Posts: 49
Joined: Thu May 03, 2018 12:08 pm

Re: nuSendMail()

Unread post by ahernandez »

Great!
Thanks toms!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuSendMail()

Unread post by admin »

.
Locked