help out a noob with a simple web development question??
I want to create a Contact-Me form on my website, but I'd like it to not go through the email client that's installed on the user's machine, in case they're at a public terminal. I don't mind if the email comes from "me" to "me", as long as nobody can use it to spam me! Is there a way to get it to safely use the SMTP server it uses when I myself send an email? (This is a Yahoo-hosted website, and I have a Yahoo email account associated with it.)
Sure. You want a simple contact form that posts to some .php/.asp/.whatever script. That script should be able to use the SMTP server from your host (Yahoo!). You may end up sending from a different email than your personal #yahoo.com one, but just look up the info for your host.
I Googled "yahoo hosting send email" and the first result looks very relevant: http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/php/php-17.html
As for wanting to stop spam from coming in through the form, just implement a captcha. I'd recommend using reCAPTCHA - it's free and has sample code that you can basically just plug in.
Related
I am trying to build a control that the user can use to send feedback to developer. I am using email as a delivery method and I leverage sendgrid email service for this. Now I want to know the users email address so I can respond back to the user's concern. I am not sure how to get the user's email in window 10. Any help or pointers please?
I would strongly recommend to use the sharing approach that has been introduced with Windows 8 - instead of writing and maintaining your own mail functionality and trying to access additional user data.
Have a look at the existing and built in e-mail functionalities. They make use of the user's connected mail accounts and the mail app. This way you don't need to worry about handling the message transmission or anything but rather hand the information over to the mail client. This way you also know how to reply back.
And as a bonus, the user can still access their message via the Sent Mails folder :)
There is a specific class for that, the EmailMessageClass (https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.email.emailmessage.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) as well as a dedicated guide with code example.
https://msdn.microsoft.com/en-us/library/windows/apps/mt269391.aspx
Essentially you can prepopulate the Mail fields with necessary app information where applicable. The user gets to choose which accounts he wants to send the mail from, but it will open in the mail client.
Is there a way to setup Outlook 2010 to run a script or some other form of sanity-check when you attempt to SEND messages from the client? My specific situation is that I use the same outlook client for multiple accounts (work, gmail, VPS server, etc) and I've found myself a couple of times sending emails "from" the wrong account.
In a perfect world I'd want to be able to write a script with logic something like the following:
when (I hit send)
if (the "source" account is "myuserid#gmail.com") then
if (there are addresses in TO or CC that match "work.com") then
pop up a dialog box that says:
"You appear to be sending email to work.com from gmail.com - do you really want to do this?"
if yes, then send it and return
if no, go back to the message compose window
that way, I'd have to actually very intentionally use a non-work email address to send email to the work people (which is rare in my particular case)
Try SendUsingAccount to read the "source" account in ItemSend.
I have developed a website in joomla, and I have a contact us page, in that the form works fine only when I use to send an email from the same domain
Eg :
From : rimaz#abcd.com
To : john#abcd.com
But when I send to a different domain the form gives an error as "Could not instantiate mail function."
Eg :
From : rimaz#abcd.com
To : john#gmail.com
Can anyone explain me about this problem ??
Instead of debugging your providers SMTP / email setup you can use the new mandrill service from the guys who do mailchimp - Mandrill ( http://blog.mailchimp.com/public-beta-of-mandrill-smtp-email-service/ ) with the plugin :
http://extensions.joomla.org/extensions/content-sharing/mailing-a-distribution-lists/20624
Mandrill is a plugin that allows your Joomla installation to send transactional emails. The only thing you need to do is to provide your Mandrill API key and enable the plugin. After that all emails (new user registration, password reset etc) will be send through the Mandrill service.
Mandrill Features:
Uses MailChimp's awesome email delivery engine instead of your server
Tracks opens and clicks so you know how effective these emails are to your users . Now you can > see what you need to change to make them
more effective.
Has pretty, visual reports of the email results
Allows you to tag the emails and see your stats filtered by tag
Why would understanding transactional emails be important for you. An example is when a user signs > up on your site an email is sent via Joomla. But, you get no reports to understand how effective that email did. These emails are sent as instructions to your users telling them a message you want them to understand. Where they designed good? Was the content well written? Was it structured properly? This is hard to say when it goes thru Joomla but now you will understand all this when the emails goes thru Mandrill.
This is a setting from your host. YOu can ask them for help in figuring out how to make it work, but they are trying to prevent you from using their hosting to spam people.
Sometimes it is possible to work around it but not always.
This usually happens due to restrictive mail server settings, which you most likely don't have influence on with shared hosting.
If you have more control over the server, you should fix the mail server settings.
If not, the easiest way is to use Joomla's ability to send mails using any SMTP mail account. Create a mail account for Joomla, and enter the credentials in Joomla's configuration. Joomla will then use that account to send mails. So will extensions, if they are properly written.
Is it possible to send an e-mail using the VS2010 development server? If that's possible, can someone point me to a sample the web?
I'd like to send an e-mail to the person who register so to keep a proof that we (yes or not) received his request. The e-mail will contains a few pertinent info, such as the name, time, and son on.
EDIT
At my work, we collect data and to whoever needs as long as the ministry we work for tells as to do so. After we receive the paper form, we write an e-mail to the form sender. Until now, we use a paper form to know who needs data. I'd like to put that form online and also be able to generate an e-mail to the sender of the request. So, since I'm still developing the application, I need to test how sending the e-mail will work. That's why I'm asking if I can send an e-mail, for instance, to my Yahoo account from my laptop using VS2008 web development server.
I remember, 2 years ago, while learning HTML with DreamWeaver, we where able to send e-mail and received them in our Yahoo e-mail accounts (without any special configuration).
Thanks for helping
The web server won't make a difference. Whether you can will depend on the environment your server is in.
The simplest option is to use .NET's built-in email classes. You're probably using .NET 3.5 so that's System.Net.Mail, e.g.
MailMessage message = new MailMessage()
{
From = new MailAddress("you#youraddress", "Your Name"),
Subject = "The subject",
Body = #"Simple text body; set IsBodyHtml for HTML"
};
message.To.Add(new MailAddress("first#recipient.address", "First recipient - can add more"));
SmtpClient smtpClient = new SmtpClient("your.smtp.server");
smtpClient.Send(message);
If you don't specify an SMTP server name in the constructor it will read it from web.config.
If you don't have access to an SMTP server but do have permission to use external web services then you could use something like http://postmarkapp.com/ - I've seen other questions about them here but haven't used them myself.
Not answering straight to the question, but:
If testing the emails sent when running on a development server is the purpose, a simple SMTP stub server like smtp4dev is a good alternative?
I'd like to be able to upload photos via email, which I've seen (and used) on eat.ly and meetups.jquery.com but I haven't been able to work out how to do this, does anyone have a solution?
Essentially I believe the process should be something like this:
1) user adds picture to email on mobile device then send to a specific email address, say 'photos#mydomain.com'
2) email server, cron job or something else looks at the senders address and tells it to add the attachement to that account
3) photo shows up on users profile page
I run Apache servers, with MySQL, PHP, and a JQuery framework. I have email servers running Courier, and I missing anything?
The simplest way to do this is to make a cron job that checks the email account using POP, and parses and process any incoming emails.
To read the image attachments, you'll need a MIME parser.
For more specific advice, please tell us what language you're trying to write the script in.
Here is a PHP POP client.