OSEmail: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(deprecated google form with phplist ajax form instead)
 
(43 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=If you would like to receive monthly updates: Subscribe or Unsubscribe with this form:=


<html>


<script type="text/javascript" src="https://phplist.opensourceecology.org/lists/admin/ui/phplist-ui-bootlist/js/jquery-1.12.1.min.js"></script>
=If You would like to receive monthly updates: =
<script type="text/javascript" src="https://phplist.opensourceecology.org/lists/admin/ui/phplist-ui-bootlist/js/dist/phpList_ui_bootlist.min.js"></script>


<noscript>
<span style="color:red"> (Last updated June, 2025) </span>
Please subscribe to our newsletter on our phplist site at <a href="https://phplist.opensourceecology.org/lists/index.php">https://phplist.opensourceecology.org/lists/</a>
</noscript>


<script type="text/javascript">
<html><iframe src="https://phplist.opensourceecology.org/lists/?p=subscribe&id=3" width=800 height=600> </iframe></html>
function checkform() {


// first, clear the response div from the previous attempts results
=Unsubscribe and Update Preferences=
jQuery("#result").empty();
To subscribe please go to [https://phplist.opensourceecology.org/lists/?p=subscribe&id=3]. To update your details and preferences please go to [http://phplist.opensourceecology.org/lists/?p=preferences&uid=d56f8157f023a2dc4217da85c43f9c71]. If you do not want to receive any more messages, please go to [http://phplist.opensourceecology.org/lists/?p=unsubscribe&uid=d56f8157f023a2dc4217da85c43f9c71].


for (i=0;i<fieldstocheck.length;i++) {
=Archives=
if (eval("document.phplistSubscribeForm.elements['"+fieldstocheck[i]+"'].type") == "checkbox") {
*[[June 29 2022 OSEmail]]
if (document.phplistSubscribeForm.elements[fieldstocheck[i]].checked) {
*[[June 20 2022 OSEmail]]
} else {
*[[June 1 2021 OSEmail]]
jQuery("#result").empty();
*[[May 2021 Design Sprint on the Seed Eco-Home 2]]
alert("The following field is required:  "+fieldnames[i]);
*[[May 2021 Email]]
eval("document.phplistSubscribeForm.elements['"+fieldstocheck[i]+"'].focus()");
*[[April 2021 OSEmail]]
return false;
*[[January 2020 OSEmail]]
}
*[[December 2019 OSEmail]]
} else {
*[[November 2019 OSEmail]]
if (eval("document.phplistSubscribeForm.elements['"+fieldstocheck[i]+"'].value") == "") {
*[[August 2019 OSEmail]]
alert("Please enter your "+fieldnames[i]);
*[[May 2019 OSEmail]]
eval("document.phplistSubscribeForm.elements['"+fieldstocheck[i]+"'].focus()");
 
return false;
}
}
}
 
for (i=0;i<groupstocheck.length;i++) {
if (!checkGroup(groupstocheck[i],groupnames[i])) {
return false;
}
}
 
if (! checkEmail()) {
alert("Email address is not valid");
return false;
}
 
return true;
}
 
var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
 
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name) {
groupstocheck[groupstocheck.length] = value;
groupnames[groupnames.length] = name;
}
 
function compareEmail() {
return (document.phplistSubscribeForm.elements["email"].value == document.phplistSubscribeForm.elements["emailconfirm"].value);
}
 
function checkEmail() {
var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(document.phplistSubscribeForm.elements["email"].value);
}
 
function checkGroup(name,value) {
option = -1;
for (i=0;i<document.phplistSubscribeForm.elements[name].length;i++) {
if (document.phplistSubscribeForm.elements[name][i].checked) {
option = i;
}
}
 
if (option == -1) {
alert ("Please enter your "+value);
return false;
}
 
return true;
}
 
function submitForm() {
 
// first, clear the response div from the previous attempts results
jQuery("#result").empty();
 
successMessage = 'Thank you for your registration. Please check your email to confirm.';
data = jQuery('#phplistSubscribeForm').serialize();
jQuery.ajax( {
 
type: 'POST',
data: data,
dataType: 'html',
 
<!-- set the id in the url below (&id=X) to the Subscribe List ID, per
    the "Config" -> "Subscribe pages" page in the phplist wui
      * https://phplist.opensourceecology.org/lists/admin/?page=spage
 
    Note that the Subscribe Page should use
      * "Don't display email address confirmation field" or it will fail
      * "Select the lists to offer" tab should check exactly one list
 
    For more information, see
      * https://discuss.phplist.org/t/solved-ajax-subscribe-api/974
-->
url: 'https://phplist.opensourceecology.org/lists/index.php?p=asubscribe&id=3',
 
// defines a function that's called when our ajax call suceeds (ie: gets a
// 200 response back)
success: function (data, status, request) {
 
jQuery("#result").empty().append(data != '' ? data : successMessage);
jQuery('#attribute1').val('');
jQuery('#email').val('');
 
},
 
// defines a function that's called when our ajax call fails (ie: gets a 500
// response back)
error: function (request, status, error) {
 
jQuery("#result").empty();
alert('Sorry, we were unable to process your subscription.');
 
}
 
});
 
}
 
</script>
 
<div id="phplistAjaxSubscribeFormWrapper" style="display:none;">
 
<p>Signup for our newsletter!</p>
 
<!-- this simple form intentionally only requires the bare necessities:
  [1] email address
  [2] accept Privacy Policy
-->
<form method="post" action="" name="phplistSubscribeForm" id="phplistSubscribeForm">
 
<!-- [1] email address -->
<input type=text name=email required="required" placeholder="Email" size="30" id="email" />
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email address");</script>
<br/>
 
<!-- [2] accept Privacy Policy -->
<input type="checkbox" name="attribute4" value="on"  class="attributeinput" id="attribute4" />
<label for="attribute4">I agree to the OSE <a href='https://wiki.opensourceecology.org/wiki/Open_Source_Ecology:Privacy_policy'>Privacy Policy</a></label>
<script language="Javascript" type="text/javascript">addFieldToCheck("attribute4","I agree to the OSE Privacy Policy");</script>
<br/>
 
<!-- other strange hidden inputs per phplist's ajax example thread
  * https://discuss.phplist.org/t/solved-ajax-subscribe-api/974
-->
<input type="hidden" name="list[2]" value="signup" />
<input type="hidden" name="listname[2]" value="newsletter"/>
<input type="hidden" name="htmlemail" value="1" />
<div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20"></div>
 
</form>
 
<!-- do some input sanity checking with js, then ajax() submit using jquery -->
<button class='button' onclick="if (checkform()) {submitForm();} return false;">Subscribe</button>
 
</div>
 
<!-- this input will fill-in with results from the phplist server after the ajax
submission via jquery -->
<div id="result"></div>
 
 
<script type="text/javascript">
 
// display the ajax subscription form iff js is enabled
document.getElementById( 'phplistAjaxSubscribeFormWrapper' ).style.display = 'block';
 
</script>
 
</html>
 
 
=OSEmail Archives=
*[[November 2018 OSEmail]]
*[[November 2018 OSEmail]]
*[[October 2018 OSEmail]]
*[[October 2018 OSEmail]]
Line 204: Line 35:
*[http://createsend.com/t/j-E6D11EAD8456F9C4 OSEmail 3.0]<br>
*[http://createsend.com/t/j-E6D11EAD8456F9C4 OSEmail 3.0]<br>
*[http://createsend.com/t/j-182478794C77DADB OSEmail 2.5]<br>
*[http://createsend.com/t/j-182478794C77DADB OSEmail 2.5]<br>
*[http://createsend.com/t/j-CD810E2B68A11B39 OSEmail 2.0]<br>
*[http://createsend.com/t/j-CD810E2B68A11B39 OSEmail 2.0]<br>  
*[http://createsend.com/t/j-6D51E600AFF04579 OSEmail 1.0]<br>
*[http://createsend.com/t/j-6D51E600AFF04579 OSEmail 1.0] (2012)<br>


=Template=
=Template=
Line 218: Line 49:


[[File:OSEmail_phplist.tar.gz]]
[[File:OSEmail_phplist.tar.gz]]
==Form==
<html><iframe src="https://docs.google.com/presentation/d/e/2PACX-1vRe8OecX2UBeQepET-EzZ7kXXu0dTxMAob_UnyI0gRex89i_FDFyu7ZjttnddeTmydrdFYJ_Bawrtio/embed?start=false&loop=false&delayms=3000" frameborder="0" width="300" height="200" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe></html>
[https://docs.google.com/presentation/d/1gwaOiXfqc5jVx5-3VKVWDdEzjNqdahYPX5fkhy6TRYQ/edit#slide=id.g45ed589c64_0_0 edit]


==pre-2018==
==pre-2018==
Line 226: Line 63:


=OSEmail Protocol=
=OSEmail Protocol=
2019 Summary
*Edit post
*Post it
*Archive it above under  <nowiki>[[Month Osemail]]</nowiki>.
*Post on Website
*Use archived version as part of our social media or on website. Archived version is an HTML embed of post source in the wiki, or a post on the blog, titled OSEmail - Month Update.
==Working Doc==
<html><iframe src="https://docs.google.com/presentation/d/1JrBv4MSdMjGriLWlAQbtuKvqBTotFLHcarleIiwX-sk/embed?start=false&loop=false&delayms=3000" frameborder="0" width="600" height="400" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe></html>
<html><iframe src="https://docs.google.com/presentation/d/1JrBv4MSdMjGriLWlAQbtuKvqBTotFLHcarleIiwX-sk/embed?start=false&loop=false&delayms=3000" frameborder="0" width="600" height="400" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe></html>


Line 231: Line 76:


=See Also=
=See Also=
* '''[[Phplist]] - publishing, admin, etc.
*[[OSEmail Log]]
*Backup list - [https://docs.google.com/spreadsheets/d/1bO5a7YrwfXWHPRk5vtgmLn4f3skjrE35cbDh8l9ZqkQ/edit#gid=562645209]
* [[Email List]]
* [[Email List]]
* [[Phplist]]
* [[Campaign Monitor]]
* [[Campaign Monitor]]


[[Category:Systems]]
[[Category:Systems]]
[[Category: Communications]]
[[Category: Communications]]

Latest revision as of 18:39, 11 August 2025


If You would like to receive monthly updates:

(Last updated June, 2025)

Unsubscribe and Update Preferences

To subscribe please go to [1]. To update your details and preferences please go to [2]. If you do not want to receive any more messages, please go to [3].

Archives

OSemail image.png

Template

This section will describe the template of the emails as it evolves over time.

2018-09

In 2018-09, we switched to phplist. Because phplist doesn't (without installing outdated plugins, that is) OOTB support content from multiple fields, using the 2-column layout would be non-trivial, at best increasing the complexity for the person responsible for sending email campaigns. For this reason, we modified the existing template to be a single column.

The existing template used html tables for structuring the layout, which is horrible. But, it works.

File:OSEmail phplist.tar.gz

Form

edit


pre-2018

In 2018, OSEmail was revisited as a self-hosted solution using phplist. Prior to this, we had used Campaign Monitor for the template sent with Mailchimp.

File:OSEmail 5.0.tar.gz

OSEmail Protocol

2019 Summary

  • Edit post
  • Post it
  • Archive it above under [[Month Osemail]].
  • Post on Website
  • Use archived version as part of our social media or on website. Archived version is an HTML embed of post source in the wiki, or a post on the blog, titled OSEmail - Month Update.

Working Doc

edit

See Also