bulk email ?

Questionsbulk email ?
Gerhard Habicher asked 5 years ago

Hi Abu and community.
Is there a chance to send email to selected recipients ?
I have a grid with data like name, adress, email,…
What I like to do is to select some rows, and with additional button (like in the bulk demo bulk-edit.php) open my standard mail program and automaticly filled the recipient with the email column data. Is there a simple way or a demo for that ?
Cheers gerhard

5 Answers
Abu Ghufran answered 5 years ago

Email sending solution in php is doable.


Line 193 adds send email button,
Line 142 is place to write email sending code in php.

Gerhard Habicher answered 5 years ago

Hi Abu,
first thanks for this demo and explanation.
Now I have the following Java script implemented:
jQuery('#list1').jqGrid('navButtonAdd', '#list1_pager',
'caption' : 'Email',
'buttonicon' : 'ui-icon-pencil',
'onClickButton': function()
window.location.href = "mailto:[email protected]; [email protected]?";
'position': 'last'

My Question is now: How can I get the selected email adesses as Parameter
in the window.location.href function ?? like in my example.

Gerhard Habicher answered 5 years ago

In addition I have changed the code to:

var str = '[email protected]; [email protected]';
window.location.href = "mailto:"+str+"?";

Is it possible to loop all selected rows ?

Abu Ghufran answered 5 years ago

// array of id's of the selected rows when multiselect options is true. Empty array if not selection
var selr = grid.jqGrid('getGridParam','selarrrow');
var t = '';
for (var x=0;x<selr.length;x++)
t += grid.jqGrid('getCell', selr[x], 'email_field')+";";

Replace email_field with the column name with emails.
var t will have concat ; string.

Gerhard Habicher answered 5 years ago

Hi Abu,
that's exactly what I need.
Many thank's

Your Answer

8 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?