I've been trying to use the mail() function mail a form on my website and it keeps failing, here is the code I'm using: I did output each of the variables previously to make sure it got the strings from the form and it did get them correctly, so I assumed it must be the mail() call. PHP: <?php $firstname = $_REQUEST['firstname']; $source = $_REQUEST['source']; $addcorrect = $_REQUEST['addcorrect']; $artist = $_REQUEST['artist']; $album = $_REQUEST['album']; $song = $_REQUEST['song']; $lyrics = $_REQUEST['lyrics']; $sent = mail("imanidiot777@gmail.com","Add/Correct Lyrics","$firstname $source $addcorrect $artist $album $song $lyrics","From: $firstname"); if($sent) {print "your message was sent";} else {print "your message failed";} //header("location:addcorrect.html"); ?> Any ideas? Thanks.
Using the E-mail function in VB script hi pradeep, i have written following code for E-mailing from VB script. it is asking yes or no confirmation and though after giving confirmation, mail is not going. can u help me on this and make it automatic. Code: Const olFolderContacts = 10 sDistName = "ipms" 'set the distribution list name here Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items intCount = colContacts.Count For i = 1 To intCount If TypeName(colContacts.Item(i)) = "DistListItem" Then Set objDistList = colContacts.Item(i) sEmails = "" If objDistList.DLName = sDistName Then For j = 1 To objDistList.MemberCount sEmails = sEmails & ";" & objDistList.GetMember(j).Address Next 'send the mail using the emails u got! ;-) enjoy End if End If Next regards, vipin gupta
You are not calling any send method, how do you expect the mail to be dispatched! All i can see is you are collecting contacts!
actually sir, i am working with automation and i need to send any e-mail or message on any mobile, on some critical event failure. what my software can do is integration with Vb-script. can u help me on this code . what i written is this:- Code: Sub OnMouseUp(x As Long, y As Long, flags As Long) Dim objOutlookMsg As Object Const olFolderContacts = 10 sDistName = "ipms" 'set the distribution list name here Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objOutlookMsg = objOutlook.CreateItem(0) Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items intCount = colContacts.Count For i = 1 To intCount If TypeName(colContacts.Item(i)) = "DistListItem" Then Set objDistList = colContacts.Item(i) sEmails = "" If objDistList.DLName = sDistName Then For j = 1 To objDistList.MemberCount sEmails = sEmails & ";" & objDistList.GetMember(j).Address Next with objOutlookMsg.To="vipin.gupta@incat.com" with objOutlookMsg.send End If End If Next End Sub so can u