WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Combine Emails (Read 6614 times)
Verne
Junior Member
**
Offline



Posts: 50
Combine Emails
Jan 6th, 2014 at 6:11pm
 
The combine emails option is useful but doesn't work the way I need it to.

I have a task that FTP's several files to a client once a day. I didn't want to send one email for each file so I chose the combine email option.

For the body of the email I am just using the File Name Variable and I am also using the Intro option for the combined emails.

The problem is that it puts the subject line into the body of the combined emails.  So the body of my email ends up looking like this.

Intro......
FileName 1

Subject Line
FileName 2

Subject Line
FileName 3

Is there any possibility you can add an option to not put the subject lines from the 2nd and consecutive emails that are getting combined into the body of the email?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #1 - Jan 7th, 2014 at 5:08am
 
Hello Verne,

I just looked at the wdPostman.exe (System.Mail) source code and see that you have 2 options.

For plain text emails (I guess you have that now), if you make sure the subject of the email is the same for all emails to combine, the subject will not be repeated. For example, having a timestamp (including seconds) will cause the subject to be repeated.

If you create html emails, http://www.watchdirectory.net/wdhelp/plugins/html_email.html , the subject is never repeated.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #2 - Jan 7th, 2014 at 4:23pm
 
Thanks,
I was using Timestamps in the subject line.  I will ask my boss if it is ok if we just use the Date Stamp as it really is just once a day.  Why would we need the time. 

I will look at the HTML email option as well.

I really appreciated your help these last few weeks.  I just inherited this system of WatchDirectory servers about 6 weeks ago and I am still learning it all.  It is pretty cool application.
Back to top
 
 
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #3 - Jan 7th, 2014 at 6:02pm
 
So removing the time from the subject line works as you said and if I do an HTML email the subject line does not show up in the body of the email but I am seeing all the HTML tags in the body of the email when I receive it.  I did originally have HEAD and TITLE tags but did remove those thinking that would make a difference.  It also is not appending my email disclaimer at the end either. It does put the intro in.
This is exactly what I have setup in the Task.  No leading or trailing spaces or anything.
Code (HTML):
<html>
<body>
$FN$
</body>
</html> 


When I get the email this is what I get in the body.  We use GMAIL for Business and I also tested with my personal gmail and I get the same thing.
Quote:
<html>
<body>The following files have been posted to your FTP site:

Path: /Pickup/

File1.txt


File2.txt
</body>
</html>

No email disclaimer at the end. Email disclaimer appends to the end just fine when I am not using HTML.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #4 - Jan 7th, 2014 at 7:17pm
 
The html looks ok, what WD version are you running?

Can you create a backup of the task, see
http://blog-en.gdpsoftware.com/2010/06/send-task-backup-to-support.html
and email it to me so I can do some tests tomorrow?
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #5 - Jan 7th, 2014 at 7:49pm
 
Gert wrote on Jan 7th, 2014 at 7:17pm:
The html looks ok, what WD version are you running?

Can you create a backup of the task, see
http://blog-en.gdpsoftware.com/2010/06/send-task-backup-to-support.html
and email it to me so I can do some tests tomorrow?

Looks like I am running on 4.6.7 on my desktop which is what I am testing with. I test everything on my desktop first before I move it to the Application servers.  All of our servers are at 4.6.6.

I am going to create a copy of the task and remove the FTP portion.  I will keep in the email and zip portion of the task and send it to you.

Also wanted to note that when I refer to the appending I mean the Disclaimer.txt file I have setup in the Email Settings of Watch Directory.  Not the Append option in the combine emails.
Back to top
 
 
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #6 - Jan 7th, 2014 at 8:09pm
 
Hmm, I tested something after I removed the FTP from the task.
I changed the message encoding from utf-8 to quoted/plain and the body of the email came out like this.
Quote:
The following files have been posted to your FTP site: Path: /Pickup/ File1.txt File2.txt

So now the HTML tags no longer show but the format of the body of the email doesn't look correct.  It should look like this.
Quote:
The following files have been posted to your FTP site:
Path: /Pickup/

File1.txt
File2.txt
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #7 - Jan 7th, 2014 at 8:20pm
 
I am still interested in the backup.

change your body txt to
Code:
<html>
<body>
$FN$<br />
</body>
</html>
 

Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #8 - Jan 7th, 2014 at 8:23pm
 
Gert wrote on Jan 7th, 2014 at 8:20pm:
I am still interested in the backup.

change your body txt to
Code:
<html>
<body>
$FN$<br />
</body>
</html>
 



Can I put HTML in my INTRO?  Because this is what I have in my intro and even that ends up on one line.
Quote:
The following files have been posted to your FTP site:
Path: /Pickup/

Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #9 - Jan 7th, 2014 at 8:24pm
 
Yes. All fields (except the subject) are html.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #10 - Jan 7th, 2014 at 8:51pm
 
I just emailed you.  But here is what my additional testing found out.

I think it is the UTF-8 encoding that doesn't work.
If I use quoted/off, quoted/plain, quoted/Win1252 or Quoted/Win1255 the body of the email comes out as one line of text.  Every time I switch the encoding back to UTF-8 I get the HTML tags in the body of the email.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #11 - Jan 7th, 2014 at 8:56pm
 
I have to leave until tomorrow.

I will check your settings and specially the utf-8 encoding.

For the time being you should really note how html works. Html doesn't support linefeeds - you need to enter a <br /> tag to force a linefeed.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #12 - Jan 7th, 2014 at 10:43pm
 
Yeah,  I am good on HTML.  I haven't done much website programming over the past few years but basic HTML pretty much sticks with you.  And Google and I have a close personal relationship.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Combine Emails
Reply #13 - Jan 8th, 2014 at 8:00am
 
Hi,

Using your settings as a starting point, I used this as the email body
Code:
<HTML>
<BODY>
<b>$FN$</b><br />
</BODY>
</HTML>
 


and this as the intro for combined emails:
Code:
<p>
The following files have been posted to your FTP site:<br />
Path: /Pickup/
</p>
 



I emailed it to my gmail and a normal account and both work fine for utf-8. This is with the recently released v4.7 which has a completely rewritten System.Mail (wdpostman). See http://blog-en.gdpsoftware.com/2013/12/watchdirectory-v47-released.html

If you do not want to upgrade to v4.7 yet, your version of WD should work fine (not with utf-8, but the other encodings) if you use the proper html linebreaks (<br />).
Back to top
 

vince.png (13 KB | 233 )
vince.png

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Verne
Junior Member
**
Offline



Posts: 50
Re: Combine Emails
Reply #14 - Jan 8th, 2014 at 3:35pm
 
Thanks Gert.
I think we are good to go using it this way. I don't think I need the UTF-8 for 99.9% of my jobs anyways.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1