CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
adding varible to make email address.

 



Bode
Novice

Oct 2, 2002, 4:08 AM

Post #1 of 9 (1979 views)
adding varible to make email address. Can't Post

Hey I neeed to be a Cheeky Badger again.

I having some problem with syntax. I have a varible named $userid which i need to add to an email domain address i.e $userid@somedomain.com, where $userid points to the actual userid i.e lj901 so i can do auto generated email.

Ive been trying things like this $mail->AddReplyTo("$userid\@somedomain.com"); But its not working.

Any help would be greatly appreciated.

thanx


davorg
Thaumaturge / Moderator

Oct 2, 2002, 5:16 AM

Post #2 of 9 (1973 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post

What type of object is $mail?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


Bode
Novice

Oct 2, 2002, 5:22 AM

Post #3 of 9 (1972 views)
Re: [davorg] adding varible to make email address. [In reply to] Can't Post

Im new to perl and am make some changes to some already existing code. But I think what you are after is this,

$mail = Win32::OLE->new('Persits.MailSender');

Hope it answers your question.

Do you know how I can concantenate a varible with a string to make up the complete email address ?



Cheers


davorg
Thaumaturge / Moderator

Oct 2, 2002, 5:27 AM

Post #4 of 9 (1971 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post


In Reply To
Im new to perl and am make some changes to some already existing code. But I think what you are after is this,

$mail = Win32::OLE->new('Persits.MailSender');

Hope it answers your question.

It does. But I'm afraid that I don't know anything about Win32 modules.


In Reply To
Do you know how I can concantenate a varible with a string to make up the complete email address ?


What you're doing seems fine to me - the problem is probably not in how you're creating the email address, but how you're passing that to the OLE object. And I'm afraid I can't help you with that.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


Bode
Novice

Oct 2, 2002, 6:37 AM

Post #5 of 9 (1968 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post

Forget about email object how would you join a varible to the line @something .com ? Like concantenation.


Bode
Novice

Oct 2, 2002, 8:24 AM

Post #6 of 9 (1963 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post

Sorry what i was trying to do was this.



$userid . "\@domainname.com"


davorg
Thaumaturge / Moderator

Oct 2, 2002, 9:27 AM

Post #7 of 9 (1962 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post

Like I said, you seem to be doing the right thing. Either "$user\@domain.com" or $user . '@domain.com' should work fine.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


Paul
Enthusiast

Oct 2, 2002, 1:38 PM

Post #8 of 9 (1959 views)
Re: [Bode] adding varible to make email address. [In reply to] Can't Post

If it isn't working then it is another part of your code and not that part, or $user is undefined.


Bode
Novice

Oct 4, 2002, 2:42 AM

Post #9 of 9 (1944 views)
Re: [davorg] adding varible to make email address. [In reply to] Can't Post

This particular script runs on an iis server. this object hacks into the asp mail to send mail.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives