Jump to content

Search the Community

Showing results for tags 'wiremail'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 11 results

  1. I have been using the wiresmtpmail module in a few installs for sending out automated emails etc etc, and it works flawlessly. However, I now need to send an email when a user submits a form, and for the life of me I can not figure out how to get the form to submit. if(isset($_POST['Submit'])) { $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $toName = $sanitizer->text($input->post->fullname); $toEmail = $sanitizer->email($input->post->email); $phone = $sanitizer->text($input->post->phone); $comments = $sanitizer->text($input->post->comments); $subject = $page->store_name . $page->title; $numSent = wireMail($toName, '', $subject, $textBody, $options); } If I remove the if statement, the form submits just fine, however you can just refresh the page (without adding anything to the fields), and it will submit a blank email every refresh. Has anyone gotten this working with a submit button?
  2. Hi. I have a setup that sends an email to all users that have subscribed to a category. When a post i published in a category, emails needs to be sent to all those users. For instance, I have 3 user subscribed, so 3 emails should be sent. However, 6 emails are sent and some of the emails are sent to 2 and 3 person at the same time. Please see attached file for what I mean. if( $page->template == "post" && !$page->isTrash() ){ if( $page->id && $page->isChanged( 'status' ) && !$page->is( Page::statusUnpublished ) ) { $from = wire('config')->adminEmail; foreach( wire( 'users' )->find( "roles=partner, location=$page->location, branch=$page->branch" ) as $user_data ){ $mail = wireMail(); $mail->to( array( $user_data->email => $user_data->contact_name ) ); $mail->from( $from, 'My Company' ); $mail->subject( 'Hi '.$user_data->contact_name.'<br>My subject' ); $mail->bodyHTML( 'My message' ); $mail->send(); } } }
  3. I'm suddently getting this error message whenever I want to edit a page: Error: Class 'ProcessWire\WireMail' not found (line 58 of /home/somedir/www/foo/wire/core/WireMailTools.php) It results in server error 500. I'm certainly never touching anything in the wire folder, the WireMail files are all there. Has anybody an idea what causes this? I'm practically blocked.
  4. I believe I have hit a roadblock on this one. I am trying to pass an array to a "cc" in wiremail (using wiremailsmpt to extend). Everything else is working, but I am getting an "invalid email address" for $cc_recipient[0]. I looked in wiremail, and it is checking to see if it is a valid email address before sending (which my variable is not). Is there a way around this by chance?
  5. Want to use Mandrill for sending emails using their HTTP API rather than SMTP? Read on! I've been working on a WireMailMandrill module for a site I'm currently adding some features to. So far, the module has been tested for simple mail sending, with basic options, and attachments. I haven't tested the full range of things that are possible with the official Mandrill PHP library, but I think I've implemented the ability to set most, if not all, of them. This should be considered beta and not entirely relied upon for sites in production. Testing and feedback welcome. I'm sorry about the lack of code comments at the moment as well, I was just throwing this together as I went along so I could move onto the next part of what I was building... This was originally mentioned in a discussion about SendGrid and Mandrill options in a thread in the Form Builder support area. Not everyone has access to that, which is why I'm putting this here WireMailMandrill on GitHub Quick example (taken directly from a site I'm working on): $mail = wireMail(); $mail->from('info@example.com', 'ExampleCOM Enterprises'); $mail->to($toMail, $toName); $mail->subject('Entry confirmation'); $mail->bodyHTML($bodyHTML); $mail->attachment($myPage->files->first()->filename); $count = $mail->send();
  6. How should messages for Wire or $mail->send() be formatted? There is some information here; you can send text and html versions, but there are no examples how to format those. /n or /r/n etc. is ignored for the text version. What syntax should be used to get line breaks in the email? For the html version, it would be nice if you could pull that from a field. For most emails you would need to be able to insert the recipient's name and other data. PHP variables don't work in field content. Are there other ways to achieve this; replace a tag in the field body with data from php script in the template? Maybe with Hanna Code? Or is that what RuntimeMarkupField is for?
  7. I'm trying to send an email notification for each inquiry submitted. Currently they're just saved as pages. I want to email notify too. So I have (mail part is at the bottom): // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($required_fields as $key => $value) { if( trim($value) == '' ) { $error_message = "<p class='error'>Please check that you have completed all the required fields.</p>"; $error = true; } } // if no errors, create a new page if(!$error) { $p = new Page(); // create new page object $p->template = 'vessel_inquiry'; // set template $p->parent = wire('pages')->get('/sales/inquiries/'); // set the parent $p->name = $input->post->vessel_id . '_' . date('YmdHisu') . '_' . $input->post->user_id; $p->title = $input->post->title; // set page title (not neccessary but recommended) $p->save(); //create the page // populate fields $p->message = $input->post->message; if($user->isLoggedin()) { $p->user = $input->post->user_id; } else { $p->fullname = $input->post->fullname; $p->email = $input->post->email; } $p->vessel_id = $input->post->vessel_id; $p->status = $p->status | Page::statusLocked; $p->save(); //save the populated fields $success = true; $mail = new WireMail(); // chained method call usage $mail->to('my@email.com')->from('some@email.com')->subject('Message Subject')->body('Message Body')->send(); } This is just to test email sending period. (The to and from emails are actually different ones that I have access to.) I've tried several times to submit inquiries and am not getting anything in spam or anywhere. I'm using XAMPP on OS X. I know email is complicated and not exactly a ProcessWire matter but do you guys know how I might be able to troubleshoot or resolve this? Surely others here have experience using wireMail() on similar setups... Thanks much.
  8. My question is simple. How to access WireMail with bootstraping ProcessWire?
  9. I used wireMail to send website email notification to users. I found that email with asian chars, the email received by user may occur garbage text. web mail client (gmail) In gmail, show original. the text on the email raw header look good. The code I use to send email $mail = wireMail(); $mail->to($settings['paypal']['order_email_notify'])->from('noreply@mydomain.com', 'No-Reply'); $mail->subject($order->member->name.' has placed an order. Order# '.$ordernumber); $email_template = wireRenderFile("partial/email-order-notification-tpl", array('order'=>$order, 'settings'=>$settings, 'user'=>$user)); $mail->bodyHTML($email_template); $mail->send(); The partial/email-order-notification-tpl.php file <?php // This email order template is for administrator for order placement notification $out = ''; $grand_total = 0; $total = 0; $out .= "<html>"; $out .= "<head>"; $out .= "<meta charset='utf-8'>"; $out .= "<meta http-equiv='x-ua-compatible' content='ie=edge'>"; $out .= "<title>Order</title>"; $out .= "<style>"; $out .= "table {width: 500px;}"; $out .= "thead {font-weight:bold;}"; $out .= "tfoot tr td:first-child {text-align: right;}"; $out .= "tr td:last-child {text-align: right;}"; $out .= "tbody tr:nth-child(even) {background: #eee;}"; $out .= "tbody tr:nth-child(odd) {background: #ddd;}"; $out .= "thead tr {background: #6d95e0;}"; $out .= "</style>"; $out .= "</head>"; $out .= "<body>"; $out .= "<p>Dear, Admin</p>"; $out .= "<p>Member <strong>{$order->member->name}</strong> is placed an order on ".date('d-M-Y H:i:s', $order->order_time)."</p>"; $out .= "<p><strong>Member number:</strong> {$user->member_number}</p>"; $out .= "<p><strong>Member name:</strong> <span style='text-transform:uppercase'>{$user->surname}</span> {$user->given_name}</p>"; $out .= "<p><strong>Order number:</strong> {$order->title}</p>"; $out .= "<p><strong>Order date:</strong>".date('d-M-Y H:i:s', $order->order_time)."</p>"; $out .= "<p><strong>PayPal Transaction Id: </strong>{$order->paypal_transaction_id}</p>"; $out .= "<p><strong>Payment method: </strong>{$order->payment_method}</p>"; $out .= "<h3>Order details</h3>"; $out .= "<table width='100%'>"; $out .= "<thead>"; $out .= "<tr>"; $out .= "<td>Item</td>"; $out .= "<td>Qty</td>"; $out .= "<td>Price</td>"; $out .= "<td>subtotal</td>"; $out .= "</tr>"; $out .= "</thead>"; $out .= "<tbody>"; foreach($order->order_items as $item) { $p = $pages->get($item->product_id); $out .= "<tr>"; $out .= "<td>{$p->title}<br/>{$p->body}</td>"; $out .= "<td>{$item->product_quantity}</td>"; $subtotal = $item->product_price * $item->product_quantity; $total += $subtotal; $out .= "<td>{$item->product_price}</td>"; $out .= "<td>".number_format($subtotal)."</td>"; $out .= "</tr>"; $grand_total += $total; } $out .= "</tbody>"; $out .= "<tfoot>"; $out .= "<tr>"; $out .= "<td colspan=3>"; $out .= "subtotal:"; $out .= "</td>"; $out .= "<td>".number_format($total)."</td>"; $out .= "</tr>"; $out .= "<tr>"; $out .= "<td colspan=3>"; $out .= "shipping:"; $out .= "</td>"; $out .= "<td>0</td>"; $out .= "</tr>"; $out .= "<tr>"; $out .= "<td colspan=3>"; $out .= "Grand total:"; $out .= "</td>"; $out .= "<td>".number_format($grand_total)."</td>"; $out .= "</tr>"; $out .= "</tfoot>"; $out .= "</table>"; $out .= "<p><strong>"."Terms and Conditions"."</strong><br/>"; $out .= $settings['terms_and_conditions']['eng']."</p>"; $out .= "</body>"; $out .= "</html>"; echo $out;
  10. Hi, there are some topics here and there mentioning WireMail. However, I can't find any traces of it in the API section nor in Modules. There are WireMail SMTP, WireMail Branding etc, but not WireMail itself. Is it a part of a publiс API or just a piece of PW internals not intended for end users?
  11. Hi I have got the wiremail working with smtp with google apps and when I test any email address from wiremail I will get the email. But when I try to submit a form on my website using form builder I will not receive email but details of the user will get register in the database. Please I need help I have tried everything possible but form build will not deliver the email.
×
×
  • Create New...