Sending s with SendGrid and Laravel

Slides:



Advertisements
Similar presentations
How to Deploy a Cloud Based Webserver in 5 minutes.
Advertisements

Presented by W1BAW Bruce Wattendorf. What is a Raspberry PI A $35 computer with out a monitor, keyboard, mouse but they all can be added.
Sayed Ahmed Computer Engineering, BUET, Bangladesh MSc. Computer Science, U of Manitoba, Canada
Backups In Linux. The Linux System Many Linux distros set up seperate "/home" and "/" (root) partitions. User configuration files are hidden with a "."
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Understanding and Building Basic Networks Chapter 3 The Other Internet.
Mastering Redis A Primer Data Masters. Special Thanks To… Planet Linux Caffe
POP Configuration Microsoft Outlook What is POP? Short for Post Office Protocol, a protocol used to retrieve from a mail server. Most.
Integrating HADOOP with Eclipse on a Virtual Machine Moheeb Alwarsh January 26, 2012 Kent State University.
Securing LAMP: Linux, Apache, MySQL and PHP Track 2 Workshop PacNOG 7 July 1, 2010 Pago Pago, American Samoa.
Remote Accessing Your Home Computer Using VNC and a Dynamic DNS Name.
Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol.
Raspberry Pi Training Truman College Goals of our Training Today Unbox and boot up the Raspberry Pi (RPi) Learn how to access the desktop graphical.
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 10 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 9 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
MCDevOps Infrastructure In One Hour. Sponsors Improving Enterprises Software Development.
Sayed Ahmed Computer Engineering, BUET, Bangladesh MSC, Computer Science, U of Manitoba, Canada
POS/420 Introduction to Unix Philip Robbins – March 12, 2013 (Week 1)
N ETWORKED & D ISTRIBUTED COMPUTING S YSTEMS L AB Programming Assignments EE323 Computer Networks.
DNS Related Commands Sayed Ahmed Computer Engineering, BUET, Bangladesh (Graduated on 2001 ) MSc, Computer Science, U of Manitoba, Canada
Bonrix SMPP Client. Index Introduction Software and Hardware Requirements Architecture Set Up Installation HTTP API Features Screen-shots.
Sayed Ahmed Computer Engineering, BUET, Bangladesh MSc., Computer Science, Canada
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
Client – Server Application Can you create a client server application: The server will be running as a service: does not have a GUI The server will run.
Conventions Department of Computer Science and Information Engineering National Taiwan University Conventions 2014/9/16/ 3 1.
Electronic Commerce Server-Side Scripting Exercises MIS Spring 2006 Instructor: John Seydel, Ph.D.
Automated Scheduling and Operations for Legacy Applications.
EXperimental Infrastructures for the Future Internet Training Session “Service Integration” Álvaro Alonso Joaquín Salvachúa UPM-DIT.
Topics Sending an Multipart message Storing images Getting confirmation Session tracking using PHP Graphics Input Validators Cookies.
FORM VALUE PASSING. Include  Include files are files that are interpreted as part of a program at runtime. Include files usually contain program code.
Ozan Şahin Ömer Üçler.  Purpose of Project  Used Technologies  Database Design  Problems&Solutions  Use Case’s  Demo.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
General rules 1. Rule: 2. Rule: 3. Rule: 10. Rule: Ask questions ……………………. 11. Rule: I do not know your skill. If I tell you things you know, please stop.
Using Google Drive on your computer A Tutorial. Using Google Drive on your Computer After watching this tutorial, I hope that you will be able to: Log.
Group Name: PNT Group Members: Prabin Joshi and Ngoc Vu.
Linux Services Configuration
Intro to Git presented by Brian K. Vagnini Hosted by.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
D EPT. OF I NFO. & C OMM., GIST Networked Media Lab. Networked Media Laboratory Dept. of Information & Communications Gwangju Institute of Science & Technology.
Assignment 1 tutorial. Assignment 1 Programming part: – Socket programming: a chat room application – Individual assignment – Deadline 20 th Oct 2015.
Installing Koha Presented By Aaron R. Williams KOHA North American Users Group.
4000 Imaje 4020 – Software Imaje 4020 – Content ■ Content of Chapter Software: 1. Flash Up 2. Netcenter 3. FTP 4. Active X 5. XCL commands 6. Exercise.
ECE 544 Software Project 1 Kuo-Chun Huang (KC). Environment Linux (Ubuntu or others) Windows with Cygwin
Configuring Guacamole create a folder for guacamole's configuration: mkdir /etc/guacamole create a file /etc/guacamole/guacamole.properties with the content:
Building Your Own Website Using:. Install & configure LAMP. Download WordPress and run it as a local website on your Raspberry Pi. Configure WordPress.
Configuration File – ProdigyView. Overview Objective Learn how to configure the system through the xml file. Requirements Understanding of the Defines.
By: Derek Ton & Alex Pappas.  Most frequently used internet service that you will manage as network administrator.  You need to understand how they.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Ns2 Installations and Basics Abdul Razaque. How to install Ubuntu on windows-7 & 8 Download the Ubuntu ISO file. You can get the ISO file from the Ubuntu.
CSCI 3100 Tutorial 5 Bootstrap & Git ZENG, Jichuan Department of Computer Science and Engineering The Chinese University of Hong.
NTP in UBuntu. The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable- latency.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Introduction to Git Thomas.
Version Control Systems
Network Programming 10- SMTP-POP3
M.Sc. Juan Carlos Olivares Rojas
Computing Clusters, Grids and Clouds Globus data service
How to setup Mozilla Thunderbird
COP 4343 Unix System Administration
NTP, Syslog & Secure Shell
Linux Ubuntu Network Commands 3 A.S.
Version Control Systems
Quicken 2018 Support
Testing POP Access with Telnet The Technology Firm Tony Fortunato.
Lab: ssh, scp, gdb, valgrind
Getting Started with Contribution to Openstack
How to your WhiteBox Bridge design
Planet Lab Demo IP Address Map
Welcome to Linux Chap#1.
Presentation transcript:

Sending Emails with SendGrid and Laravel Sayed Ahmed Computer Engineering, BUET, Bangladesh (2001) MSc. Computer Science, U of Manitoba, Canada Exploring Computing from 1996

Requirements A SendGrid Account Beanstalkd Laravel go mail worker Cloud based email delivery services http://sendgrid.com/ Beanstalkd Email queue http://kr.github.io/beanstalkd/ Laravel go mail worker Laravel Mail sender using Sendgrid [as an example] https://github.com/zackkitzmiller/laravel-go-mail-worker https://github.com/zackkitzmiller/laravel-go-mail- worker/blob/master/laravel-go-mail- worker/app/commands/QueueEmailCommand.php https://github.com/zackkitzmiller/laravel-go-mail- worker/blob/master/go/src/zackkitzmiller/laravel-go-mail-worker/main.go

Must Watch Mail Queue configuration for Laravel https://github.com/laravel/laravel/blob/master/ app/config/queue.php Basic Mail Configuration for Laravel [Not a Must] https://github.com/laravel/laravel/blob/master/ app/config/mail.php

How These All Will Work You need to queue the message in Beanstalkd You need to configure Laravel and Laravel Go Mailer for that From your code, you need to use methods to queue the message $message = "This is a queue test job. We won't really need to pass data for this demo."; Queue::push('QueueDemo', array('message' => $message)); This apparently looks like will also work Mail::queueOn('queue-name', 'emails.welcome', $data, function($message) { $message ->to('foo@example.com', 'John Smith') ->subject('Welcome!'); }); Then the GO application will send this email It’s Laravel go mail worker Then Go mailer will use SendGrid to send the mail

How These All Will Work Configuration for Go mail worker BEANSTALKD: location of the beanstalk installation (e.g. localhost:11300) SENDGRID_USER: username for sendgrid account SENDGRID_PASS: password for sendgrid account

Installation Install Go Mailer Artisan command email:send. Will do that for you Not sure yet that it will work; after working with it, I will update Though you can get the copy of the Laravel- go-mailer and use that for sure

Miscellaneous How to Download and Install Beanstalkd http://kr.github.io/beanstalkd/download.html Src: git clone git://github.com/kr/beanstalkd.git Install: Mac: sudo port install beanstalkd Debian: sudo apt-get install beanstalkd Ubuntu: sudo apt-get install beanstalkd Fedora: su -c 'yum install beanstalkd' Sending emails from Laravel using Mail Servers such as SwiftMailer http://laravel.com/docs/mail Mail Queue tutorial for Laravel http://vimeo.com/64779946

Miscellaneous Beanstalkd listed as the default in Laravel- go-mailer queue config file https://github.com/zackkitzmiller/laravel-go- mail-worker/blob/master/laravel-go-mail- worker/app/config/queue.php These are the environment variables Set SENDGRID_USER, SENDGRID_PASS, and BEANSTALKD env vars Can be set in Linux profile type files Also from within PHP you can set

Environment Variables and PHP echo 'My username is ' .$_ENV["USER"] . '!'; // Example use of getenv() $ip = getenv('REMOTE_ADDR'); putenv("UNIQID=$uniqid");

Beanstalkd Configuration File Content You can know but you will not need to work with it much for basic functionality [program:qlistener] command=php /var/www/laravel/artisan queue:listen process_name=%(program_name)s numprocs=1 numprocs_start=0 autostart=true autorestart=true startsecs=1 startretries=3 exitcodes=0,2 stopsignal=TERM stopwaitsecs=10

Beanstalkd Configuration File Content user=ubuntu redirect_stderr=false stdout_logfile=/var/log/supervisor/qlistener-stdout.log stdout_logfile_maxbytes=50MB stdout_logfile_backups=10 stdout_capture_maxbytes=0 stdout_events_enabled=false stderr_logfile=/var/log/supervisor/qlistener-stderr.log stderr_logfile_maxbytes=50MB stderr_logfile_backups=10 stderr_capture_maxbytes=0 tderr_events_enabled=false environment=LARAVEL_ENV="production" serverurl=AUTO

Reference http://b.z19r.com/post/sending-email-with- laravel-sendgrid-beanstalkd-and-go