OpenEMM Version 6.1
System: Debian Lenny
Webservice didn't send admin, test and world mailings out, don't know why, Webservice returns 1, so it should be okay, but no mails will generated. Also the mailing isn't marked as send in OpenEMM backend. Also there is no entry in mailing_account_tbl for the mailing
Edit: Other Webservices work!
Webservice sendMailing didn't work
Moderator: moderator
Addition:
an extract from the maildrop_status_tbl Table, other mailings have genstatus = 3.
an extract from the maildrop_status_tbl Table, other mailings have genstatus = 3.
Code: Select all
root@localhost (openemm)>select * from maildrop_status_tbl WHERE mailing_id=106;
+-----------+------------+--------------+------------+---------------------+------+-----------+---------------------+-----------+---------------------+
| status_id | company_id | status_field | mailing_id | senddate | step | blocksize | gendate | genstatus | genchange |
+-----------+------------+--------------+------------+---------------------+------+-----------+---------------------+-----------+---------------------+
| 145 | 1 | T | 106 | 2010-11-08 09:15:03 | 0 | 0 | 2010-11-08 09:14:04 | 0 | 2010-11-08 09:14:04 |
| 146 | 1 | T | 106 | 2010-11-08 09:21:07 | 0 | 0 | 2010-11-08 09:20:07 | 0 | 2010-11-08 09:20:07 |
| 147 | 1 | T | 106 | 2010-11-08 09:21:08 | 0 | 0 | 2010-11-08 09:20:08 | 0 | 2010-11-08 09:20:08 |
| 148 | 1 | T | 106 | 2010-11-08 09:21:09 | 0 | 0 | 2010-11-08 09:20:09 | 0 | 2010-11-08 09:20:09 |
| 149 | 1 | T | 106 | 2010-11-08 09:29:49 | 0 | 0 | 2010-11-08 09:28:49 | 0 | 2010-11-08 09:28:49 |
| 150 | 1 | T | 106 | 2010-11-08 09:30:01 | 0 | 0 | 2010-11-08 09:29:02 | 0 | 2010-11-08 09:29:02 |
+-----------+------------+--------------+------------+---------------------+------+-----------+---------------------+-----------+---------------------+
Okay, i looked in the source code and found a workaround by myself:
That's the code i used to send my request.
The timestamp is the current timestamp + 60 sec.
In the source-code from OpenEMM are follow lines:
EmmWebservice.java - Line: 396 - 411
It seems that the webservice only trigger a mail if GenStatus = 1, which is only given when the timestamp is 0.
So my workaround is using timestamp = 0, but it is only an workaround, no solution.
Please fix it.
That's the code i used to send my request.
Code: Select all
sendMailing("username", "password", 106, "T", $i_send_timestamp, 0, 0);
In the source-code from OpenEMM are follow lines:
EmmWebservice.java - Line: 396 - 411
Code: Select all
if(sendTime != 0) {
aCal.setTime(new java.util.Date(((long) sendTime) * 1000L));
drop.setGenStatus(0);
} else {
drop.setGenStatus(1);
}
drop.setSendDate(aCal.getTime());
aMailing.getMaildropStatus().add(drop);
dao.saveMailing(aMailing);
if(drop.getGenStatus() == 1
&& drop.getStatus() != MaildropEntry.STATUS_ACTIONBASED
&& drop.getStatus() != MaildropEntry.STATUS_DATEBASED) {
aMailing.triggerMailing(drop.getId(), new Hashtable(), con);
}
returnValue = 1;
So my workaround is using timestamp = 0, but it is only an workaround, no solution.
Please fix it.
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Webservice sendMailing didn't work
I could reproduce the described behaviour. It is a bug, we will take care of it and announce the availability of a bugfix via Twitter at http://twitter.com/openemm .
OpenEMM Maintainer
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Webservice sendMailing didn't work
Please try this code instead:
(else clause removed which sets GenStatus to 1).
Does it work now? (BTW, admin and test mails are always sent immediately.)
Code: Select all
if(sendTime != 0) {
aCal.setTime(new java.util.Date(((long) sendTime) * 1000L));
drop.setGenStatus(0);
}
drop.setSendDate(aCal.getTime());
aMailing.getMaildropStatus().add(drop);
dao.saveMailing(aMailing);
if(drop.getGenStatus() == 1
&& drop.getStatus() != MaildropEntry.STATUS_ACTIONBASED
&& drop.getStatus() != MaildropEntry.STATUS_DATEBASED) {
Does it work now? (BTW, admin and test mails are always sent immediately.)
OpenEMM Maintainer
-
- Site Admin
- Posts: 2628
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: Webservice sendMailing didn't work
While we never got a feedback for our suggestion we will provide a revised WS method with release 2012 of OpenEMM.
OpenEMM Maintainer